Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: nag1010(at)gmail(dot)com, jdnelson(at)dyn(dot)com, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Date: 2017-08-28 11:14:54
Message-ID: CAB7nPqT03+uaHXun3ft4LJWNDviKTgWSZDsXiqyNdtcCfeqcgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Aug 28, 2017 at 8:02 PM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> The first patch (0001-) fixes this problem, preventing the
> problematic state of WAL segments by retarding restart LSN of a
> physical replication slot in a certain condition.

FWIW, I have this patch marked on my list of things to look at, so you
can count me as a reviewer. There are also some approaches that I
would like to test because I rely on replication slots for some
infrastructure. Still...

+ if (oldFlushPtr != InvalidXLogRecPtr &&
+ (restartLSN == InvalidXLogRecPtr ?
+ oldFlushPtr / XLOG_SEG_SIZE != flushPtr / XLOG_SEG_SIZE :
+ restartLSN / XLOG_BLCKSZ != flushPtr / XLOG_BLCKSZ))
I find such code patterns not readable.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2017-08-28 12:26:38 Re: [HACKERS] [postgresql 10 beta3] unrecognized node type: 90
Previous Message Kyotaro HORIGUCHI 2017-08-28 11:02:40 Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-08-28 11:28:52 Re: psql --batch
Previous Message Kyotaro HORIGUCHI 2017-08-28 11:02:40 Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?