Re: Possible bug in logical replication.

Arseny Sher <a.sher@postgrespro.ru>

From: Arseny Sher <a.sher@postgrespro.ru>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-05-17T10:54:07Z
Lists: pgsql-hackers
Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes:

> I think that using restart_lsn instead of confirmed_flush is not right approach.
> If restart_lsn is not available and confirmed_flush is pointing to page
> boundary, then in any case we should somehow handle this case and adjust
> startlsn to point on the valid record position (by jjust adding page header
> size?).

Well, restart_lsn is always available on live slot: it is initially set
in ReplicationSlotReserveWal during slot creation.


--
Arseny Sher
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Commits

  1. Rewrite comments in replication slot advance implementation

  2. Fix a couple of bugs with replication slot advancing feature

  3. Ability to advance replication slots