From: John Lumby <johnlumby@hotmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Julien Rouhaud <julien.rouhaud@dalibo.com>
Cc: pgsql bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14109: pg_rewind fails to update target control file in one scenario
Date: Tue, 26 Apr 2016 09:37:38 -0400
Message-ID: <COL131-W17C9281E80FCB79AC5D049A3630@phx.gbl> (raw)
In-Reply-To: <CAB7nPqTVeSD_Poqe0YFcgttJtYAAkfZD_aKhrjZ6tO86eas7LQ@mail.gmail.com>
References: <20160424192549.2725.71787@wrigleys.postgresql.org>
<CAB7nPqSaj3vHsW9361hacr=Uh0Os3Fq8bNUPd-Edb6pb15Jv_A@mail.gmail.com>
<COL131-W5403F755BF3290F32B1E62A3620@phx.gbl>
<CAB7nPqRdd8ESxKmt=VvzgU171iRrzJABnEU6mCedaG-NDXSOvw@mail.gmail.com>
<COL131-W1121BE46904C56BD5B948DA3620@phx.gbl>
<571E2F5F.4080500@dalibo.com>
<COL131-W83A40422B650A246F11287A3620@phx.gbl>
<571E4EB1.5000104@dalibo.com>
<COL131-W383FA65CC9B62A7ED0157DA3620@phx.gbl>
<CAB7nPqTVeSD_Poqe0YFcgttJtYAAkfZD_aKhrjZ6tO86eas7LQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Thanks Michael,
----------------------------------------
> Date: Tue, 26 Apr 2016 08:04:58 +0900
> Subject: Re: [BUGS] BUG #14109: pg_rewind fails to update target control file in one scenario
> From: michael.paquier@gmail.com
> To: johnlumby@hotmail.com
> CC: julien.rouhaud@dalibo.com; pgsql-bugs@postgresql.org
>
> On Tue, Apr 26, 2016 at 7:15 AM, John Lumby <johnlumby@hotmail.com> wrote:
>> So, assuming this is reliable (will work without requiring archiving)
>> then my problem is solved.
>
> Depending on the checkpoint frequency and the activity on your
> systems, you may face problems with missing WAL segments at some point
> because past WAL segments need to be recycled or removed by the server
> to move on with its life.
Yes, I fear I could be caught out by that --
in fact that is why I now always "stabilize" the replication by halting ins/upd/del activity
and then shut the current Primary down first before promoting current Standby.
I *think* that then should guarantee there cannot be any missing WAL segments
when I then rewind the old Primary to become new Standby.
> One way to take care of this class of
> problems is to use wal_keep_segments. An even better one is called
> replication slot.
Regarding replication slots -- Actually I do use them (I think it is unsafe to run
streaming replication without either archiving or a replication slot)
but even that would still not guarantee success
if I did not take the precaution of shutting down current primary first before flip.
And .. we discussed this very point in pqsql-general just a month ago --
http://www.postgresql.org/message-id/COL131-W804D45E77B0D0FB1EF08B1A3890@phx.gbl
I did not get any answer to my suggestion in that post but I think it might be useful.
> This solely depends on how your system is working,
> so perhaps you will not need some extra configuration.
> --
> Michael
I think there needs to be some clear instructions on exactly what configuration is needed
to be able to run streaming replication and always be able to flip
Standby->Primary , <some actions> , Primary-> Standby
and in those posts in pgsql-general I wrote a suggested addition to the wiki page
but was unable to edit it myself.
Cheers, John
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: johnlumby@hotmail.com, michael.paquier@gmail.com, julien.rouhaud@dalibo.com
Subject: Re: BUG #14109: pg_rewind fails to update target control file in one scenario
In-Reply-To: <COL131-W17C9281E80FCB79AC5D049A3630@phx.gbl>
References: <20160424192549.2725.71787@wrigleys.postgresql.org> <CAB7nPqSaj3vHsW9361hacr=Uh0Os3Fq8bNUPd-Edb6pb15Jv_A@mail.gmail.com> <COL131-W5403F755BF3290F32B1E62A3620@phx.gbl> <CAB7nPqRdd8ESxKmt=VvzgU171iRrzJABnEU6mCedaG-NDXSOvw@mail.gmail.com> <COL131-W1121BE46904C56BD5B948DA3620@phx.gbl> <571E2F5F.4080500@dalibo.com> <COL131-W83A40422B650A246F11287A3620@phx.gbl> <571E4EB1.5000104@dalibo.com> <COL131-W383FA65CC9B62A7ED0157DA3620@phx.gbl> <CAB7nPqTVeSD_Poqe0YFcgttJtYAAkfZD_aKhrjZ6tO86eas7LQ@mail.gmail.com> <COL131-W17C9281E80FCB79AC5D049A3630@phx.gbl>
* 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