Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebmzL-0008EN-Bu for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2018 12:38:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebmzK-00079H-Rg for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2018 12:38:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebmzK-000797-Bh for pgsql-hackers@lists.postgresql.org; Wed, 17 Jan 2018 12:38:42 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ebmzC-0005Jw-U9 for pgsql-hackers@postgresql.org; Wed, 17 Jan 2018 12:38:40 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A19735F79C; Wed, 17 Jan 2018 07:38:32 -0500 (EST) Date: Wed, 17 Jan 2018 07:38:32 -0500 From: Stephen Frost To: Michael Paquier Cc: Kyotaro HORIGUCHI , Andres Freund , nag1010@gmail.com, jdnelson@dyn.com, PostgreSQL mailing lists Subject: Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)? Message-ID: <20180117123832.GB2416@tamriel.snowman.net> References: <20170906192353.ufp2dq7wm5fd6qa7@alap3.anarazel.de> <20170907.123347.101584520.horiguchi.kyotaro@lab.ntt.co.jp> <20171026.190551.208996945.horiguchi.kyotaro@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aPh16JNycFidYDkA" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --aPh16JNycFidYDkA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Michael, Andres, * Michael Paquier (michael.paquier@gmail.com) wrote: > On Fri, Oct 27, 2017 at 3:13 AM, Michael Paquier > wrote: > > On Thu, Oct 26, 2017 at 3:05 AM, Kyotaro HORIGUCHI > > wrote: > >> The largest obstacle to do that is that walreceiver is not > >> utterly concerned to record internals. In other words, it doesn't > >> know what a record is. Teaching that introduces much complexity > >> and the complexity slows down the walreceiver. > >> > >> Addition to that, this "problem" occurs also on replication > >> without a slot. The latest patch also help the case. > > > > That's why replication slots have been introduced to begin with. The > > WAL receiver gives no guarantee that a segment will be retained or not > > based on the beginning of a record. That's sad that the WAL receiver > > does not track properly restart LSN and instead just uses the flush > > LSN. I am beginning to think that a new message type used to report > > the restart LSN when a replication slot is in use would just be a > > better and more stable solution. I haven't looked at the > > implementation details yet though. >=20 > Yeah, I am still on track with this idea. Splitting the flush LSN and > the restart LSN properly can allow for better handling on clients. For > now I am moving this patch to the next CF. Thanks for looking at this patch previously. This patch is still in Needs Review but it's not clear if that's correct or not, but this seems to be a bug-fix, so it would be great if we could make some progress on it (particularly since it was reported over a year ago and goes back to 9.4, according to the thread, from what I can tell). Any chance one of you can provide some further thoughts on it or make it clear if we are waiting for a new patch or if the existing one is still reasonable and just needs to be reviewed (in which case, perhaps one of you could help with that..)? Thanks again! Stephen --aPh16JNycFidYDkA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaX0PIAAoJEO1sijiDR2RVZRMP/RdxUH0wnL8KcBi7jXpJrUUh r0s042SMlb3s6Ep9N2Sg0xN1+BgAMlDHJD167YBftyw7cDh/MWC93JmUZz8dnKkr HJX9KznXQXZODdAJHq2lYzHW+bAR07BkqF4did4E//tFNw6gBfhbe4uPa3sN2DDi j2LVCNvFrQuK4DmmMvXl84ribjVyOEfxPXb70hLVQAIzw8p0OPn6P/oW4QI+yuZg Xy6PMpRUYpQZhThQEBeKL+u88KPUqv/KUdvPjn/UrNVe7/lTvvFd4XAJxZD7AWBo ccstIUkQTs5nsuhAU1nGZZ5e/N3LzwHbxh2HaEnIK0aIj5FvRR1QsieOEN0EP+TG WVsb9ARjh2ADG7PpSLLV/pZCHtAQYnxFzLeUnypNRCqFM8Vfip5n4wucxJtYBuNn OTvuIFmtw0x0Py7G1GQDv4bd5InLpUHT+Wt6eZ/CUHU+6vNWQPF6M/WH7jRkpzRR K5Ka1Q0GJ2HB5b35IJ1gRci3SGi+9duPsY8t68gA3B8M4HUJV9V3yxDunHUM9HmQ hswsBs2MkVq98WEfxNPRNbVrVqAH/Ltp+jpcjfCES8tIGLPUAFNYhSI8BBvGQ+rO Qi3IJqzz0Trn4zrLOfc/S01/RPvzALDAOsBN+j9ZurjlDIQPKEAKKFsKdISFq8bv mIU59nVv6C0hd+ahrft0 =VQp7 -----END PGP SIGNATURE----- --aPh16JNycFidYDkA--