public inbox for [email protected]help / color / mirror / Atom feed
[PATCH v4 3/3] Fix timeline-tracking failure while sending a historic timeline 2+ messages / 2 participants [nested] [flat]
* [PATCH v4 3/3] Fix timeline-tracking failure while sending a historic timeline @ 2020-12-09 08:22 Kyotaro Horiguchi <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Kyotaro Horiguchi @ 2020-12-09 08:22 UTC (permalink / raw) Walsender should track timeline switches while sending a historic timeline. Regain that behavior, which was broken in PG13, by a thinko of 709d003fbd. --- src/backend/replication/walsender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index fe0d368a35..8545c6c423 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2491,7 +2491,7 @@ WalSndSegmentOpen(XLogReaderState *state, XLogSegNo nextSegNo, XLogSegNo endSegNo; XLByteToSeg(sendTimeLineValidUpto, endSegNo, state->segcxt.ws_segsize); - if (state->seg.ws_segno == endSegNo) + if (nextSegNo == endSegNo) *tli_p = sendTimeLineNextTLI; } -- 2.27.0 ----Next_Part(Thu_Jan__7_16_32_36_2021_122)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-Fix-timeline-tracking-failure-while-sending-a-PG13.patch.txt" ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING @ 2024-12-18 10:49 Amit Kapila <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2024-12-18 10:49 UTC (permalink / raw) To: James Coleman <[email protected]>; +Cc: Ashutosh Bapat <[email protected]>; Laurenz Albe <[email protected]>; Peter Smith <[email protected]>; pgsql-hackers On Thu, Feb 8, 2024 at 7:24 PM James Coleman <[email protected]> wrote: > > On Thu, Feb 8, 2024 at 4:47 AM Ashutosh Bapat > <[email protected]> wrote: > > > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe <[email protected]> wrote: > > > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > > - how to set the replica identity. If a table without a replica identity is > > > > + how to set the replica identity. If a table without a replica identity > > > > + (or with replica identity behavior the same as <literal>NOTHING</literal>) is > > > > added to a publication that replicates <command>UPDATE</command> > > > > or <command>DELETE</command> operations then > > > > subsequent <command>UPDATE</command> or <command>DELETE</command> > > > > > > I had the impression that the root of the confusion was the perceived difference > > > between "REPLICA IDENTITY NOTHING" and "no replica identity", and that change > > > doesn't improve that. > > > > > > How about: > > > > > > If a table without a replica identity (explicitly set to <literal>NOTHING</literal>, > > > or set to a primary key or index that doesn't exist) is added ... > > > > Another possibility is just to improve the documentation of various > > options as follows. > > > > DEFAULT > > > > If there is a primary key, record the old values of the columns of the > > primary key. Otherwise it acts as NOTHING. This is the default for > > non-system tables. > > > > USING INDEX index_name > > > > Records the old values of the columns covered by the named index, that > > must be unique, not partial, not deferrable, and include only columns > > marked NOT NULL. If this index is dropped, the behavior is the same as > > NOTHING. > > > > FULL > > > > Records the old values of all columns in the row. > > > > NOTHING > > > > Records no information about the old row. This is equivalent to having > > no replica identity. This is the default for system tables. > > This is the simplest change, and it does solve the confusion, so I'd > be happy with it also. The other proposals have the benefit of having > all the information necessary on the publications page rather than > requiring the user to refer to the ALTER TABLE REPLICA IDENTITY page > to understand what's meant. > There is no harm in having it at both places (publications page and ALTER TABLE REPLICA IDENTITY page). Would someone be interested in preparing a patch with the changes agreed upon? -- With Regards, Amit Kapila. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-12-18 10:49 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-12-09 08:22 [PATCH v4 3/3] Fix timeline-tracking failure while sending a historic timeline Kyotaro Horiguchi <[email protected]> 2024-12-18 10:49 Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING Amit Kapila <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox