Thread: data_checksums = off

data_checksums = off

From
Wasim Devale
Date:
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

Re: data_checksums = off

From
Michael Banck
Date:
Hi,

On Mon, Sep 09, 2024 at 02:24:04PM +0530, Wasim Devale wrote:
> 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?

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



Re: data_checksums = off

From
Zaid Shabbir
Date:
Hello,

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

For reference please view the official PostgreSQL guide.


Regards,
Zaid

On Mon, Sep 9, 2024 at 1:54 PM Wasim Devale <wasimd60@gmail.com> wrote:
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

Re: data_checksums = off

From
Muhammad Usman Khan
Date:

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


On Mon, 9 Sept 2024 at 13:54, Wasim Devale <wasimd60@gmail.com> wrote:
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