Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: nag1010@gmail.com, jdnelson@dyn.com, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-08-28T11:14:54Z
Lists: pgsql-bugs, pgsql-hackers
On Mon, Aug 28, 2017 at 8:02 PM, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.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
Commits
-
Fix scenario where streaming standby gets stuck at a continuation record.
- c06380e97692 9.4.18 landed
- 4ea8f7d4553e 9.5.13 landed
- 7b7521d65772 9.6.9 landed
- ca572db22f62 10.4 landed
- 066871980183 11.0 landed