Re: pg_checksums? - Mailing list pgsql-general

From Nikolay Samokhvalov
Subject Re: pg_checksums?
Date
Msg-id CANNMO+LRS5JzkkNZZNZUkBc2zJgw=zg2sS9X3q5jPMYykm5VvA@mail.gmail.com
Whole thread Raw
In response to Re: pg_checksums?  (Alexander Kukushkin <cyberdemn@gmail.com>)
Responses Re: pg_checksums?
List pgsql-general
On Mon, Oct 30, 2023 at 6:57 AM Alexander Kukushkin <cyberdemn@gmail.com> wrote:
...
> As Michael already said, the following workflow works just fine (I did it dozens of times):
> 1. enable checksums on the standby node
> 2. start the standby and let it catch up with the primary
> 3. switchover to a standby node
> 4. enable checksums on the former primary (now replica).

There is also a good trick described in
https://www.crunchydata.com/blog/fun-with-pg_checksums to avoid
accidental start of Postgres:

after pg_ctl stop and before pg_checksums --enable, do:
  mv data/pg_twophase data/pg_twophase.DO_NOT_START_THIS_DATABASE

and once pg_checksums --enable is done, move it back.

Additionally, I compiled some thoughts about running pg_checksums
without downtime (Patroni-friendly, of course) here:
https://twitter.com/samokhvalov/status/1719961485160689993.



pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: pg_dump/pg_restore --jobs practical limit?
Next
From: Tomek
Date:
Subject: Re: pg_dump/pg_restore --jobs practical limit?