Re: Possible bug in logical replication. - Mailing list pgsql-hackers

From Arseny Sher
Subject Re: Possible bug in logical replication.
Date
Msg-id 878t88ql2p.fsf@ars-thinkpad
Whole thread Raw
In response to Re: Possible bug in logical replication.  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Possible bug in logical replication.
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:

> Maybe I am being too naive, but wouldn't it be just enough to update the
> confirmed flush LSN to ctx->reader->ReadRecPtr?  This way, the slot
> advances up to the beginning of the last record where user wants to
> advance, and not the beginning of the next record:

Same problem should be handled at pg_logical_slot_get_changes_guts and
apply worker feedback; and there is a convention that all commits since
confirmed_flush must be decoded, so we risk decoding such boundary
commit twice.

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


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Keeping temporary tables in shared buffers
Next
From: Michael Paquier
Date:
Subject: Re: Fix some error handling for read() and errno