Subject: data_checksums = off

From: Wasim Devale <[email-masked]>
Date: Mon, 9 Sep 2024 14:24:04 +0530

Hi All

The data_checksums option is off in pg_settings and it is a preset option
to do while doing initialisation of data directory. I can not use alter
command any solutions to it?

Thanks,
Wasim

---

From: Michael Banck <[email-masked]>
Date: Mon, 9 Sep 2024 10:59:20 +0200

Hi,

> command any solutions to it?

You need to shut down the instance and then run
pg_checksums --enable -D <data directory>

Checksums cannot be enabled while the instance is online and the above
needs to rewrite every block so it can take a while on larger instances.

Michael

---

From: Zaid Shabbir <[email-masked]>
Date: Mon, 9 Sep 2024 13:59:58 +0500

Hello,

You can use pg_checksum to enable or disable data_checksums after the
cluster initialization.

For reference please view the official PostgreSQL guide.

https://www.postgresql.org/docs/current/app-pgchecksums.html

Regards,
Zaid

---

From: Muhammad Usman Khan <[email-masked]>
Date: Mon, 9 Sep 2024 14:00:33 +0500

Hi,
You need to initialize new directory with cheksums

sudo -u postgres initdb -D /path/to/new/data/directory --data-checksums
Make sure to adjust permissions of data directory