Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av3BU-0002cd-17 for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Apr 2016 13:37:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1av3BT-0001eF-4g for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Apr 2016 13:37:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1av3BS-0001cl-B8 for pgsql-bugs@postgresql.org; Tue, 26 Apr 2016 13:37:46 +0000 Received: from col004-omc1s13.hotmail.com ([65.55.34.23]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1av3BO-0007Eo-0y for pgsql-bugs@postgresql.org; Tue, 26 Apr 2016 13:37:45 +0000 Received: from COL131-W17 ([65.55.34.8]) by COL004-OMC1S13.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 26 Apr 2016 06:37:39 -0700 X-TMN: [7XQzm2d9VVmVw8qJa1hZDR2f9m3J08ep] X-Originating-Email: [johnlumby@hotmail.com] Message-ID: From: John Lumby To: Michael Paquier CC: Julien Rouhaud , pgsql bugs Subject: Re: BUG #14109: pg_rewind fails to update target control file in one scenario Date: Tue, 26 Apr 2016 09:37:38 -0400 Importance: Normal In-Reply-To: References: <20160424192549.2725.71787@wrigleys.postgresql.org>,,,,,<571E2F5F.4080500@dalibo.com>,,<571E4EB1.5000104@dalibo.com>,, Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 26 Apr 2016 13:37:39.0384 (UTC) FILETIME=[CD172B80:01D19FC0] X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 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,=A0 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 Stand= by. I *think* that then should guarantee there cannot be any missing WAL segmen= ts 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=A0 --=A0=A0 Actually I do use them (I think it = is unsafe to run streaming replication without either archiving or a replication slot)=20 but even that would still not guarantee success=20 if I did not take the precaution of shutting down current primary first bef= ore flip. And=A0 ..=A0=A0 we discussed this very point in pqsql-general just a month = ago=A0 -- http://www.postgresql.org/message-id/COL131-W804D45E77B0D0FB1EF08B1A3890@ph= x.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 configura= tion is needed to be able to run streaming replication and always be able to flip Standby->Primary=A0=A0 ,=A0 =A0=A0 ,=A0=A0 Primary-> Standby and in those posts in pgsql-general I wrote a suggested addition to the wik= i page but was unable to edit it myself. Cheers,=A0=A0=A0 John =20=09=09=20=09=20=20=20=09=09=20=20 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs