From: Laurenz Albe <laurenz.albe@cybertec.at>
To: soumik.bhattacharjee@kpn.com
Cc: pgsql-admin@lists.postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_rewind
Date: Tue, 28 Jan 2020 09:48:09 +0100
Message-ID: <7389f3b042bed5d6b8fcf4cbf890fc932bc7963e.camel@cybertec.at> (raw)
In-Reply-To: <2A91BEF8171A5349931391E0C721CC537D787704@CPEMS-KPN501.KPNCNL.LOCAL>
References: <2A91BEF8171A5349931391E0C721CC537D787037@CPEMS-KPN501.KPNCNL.LOCAL>
<2079fc510f11cc43ed95a34afbec01d51a745d67.camel@cybertec.at>
<2A91BEF8171A5349931391E0C721CC537D787704@CPEMS-KPN501.KPNCNL.LOCAL>
On Mon, 2020-01-27 at 16:01 +0000, soumik.bhattacharjee@kpn.com wrote:
> I set the "wal_log_hints = on" , but enabling this parameter "on" in new MASTER(old SLAVE) needs a restart--
> which I cannot do as all application transactions are going on there now.
>
> Also I used pg_rewind in old MASTER(which now I want to make as new SLAVE) and it was successful,
> but this also needs restart of new MASTER(old SLAVE) which is again an issue.
>
> Command used: ./pg_rewind -D $PGDATA --source-server='host=<IP Address> port=5432 user=postgres password=xxxx
>
> Could you please suggest how to get this to work to keep the MASTER(old SLAVE) up & running and make the old MASTER(new SLAVE)
If you want to use "pg_rewind", you have to plan for that ahead of time
by either using data page checksums or enabling "wal_log_hints".
The first requires longer don time, the second a restart.
There is no way to do that retroactively.
Just use "pg_basebackup" to create a new standby, and enable
"wal_log_hints" next time you get a chance to restart.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, soumik.bhattacharjee@kpn.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_rewind
In-Reply-To: <7389f3b042bed5d6b8fcf4cbf890fc932bc7963e.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox