From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Cc: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Conflict detection for update_deleted in logical replication |
Date: | 2025-05-16 09:10:26 |
Message-ID: | CAA4eK1LYeK7zZ3mvG7gQgEZk=+f77PAYfskBv639E621iW+AiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 16, 2025 at 12:01 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Fri, May 16, 2025 at 11:15 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> >
> > BTW, another related point is that when we decide to stop retaining
> > dead tuples (via should_stop_conflict_info_retention), should we also
> > consider the case that the apply worker didn't even try to get the
> > publisher status because previously it decided that
> > oldest_nonremovable_xid cannot be advanced due to its
> > OldestActiveTransactionId?
> >
>
> Do you mean avoid stop-conflict-retention in such a case as apply
> worker itself did not request status from the publisher? If I
> understood your point correctly, then we can do that by advancing the
> timer to a new value even if we did not update candidate-xid and did
> not ask the status from the publisher.
>
But candidate_xid_time is also used in wait_for_local_flush() to check
clock_skew between publisher and subscriber, so for that purpose, it
is better to set it along with candidate_xid. However, can't we rely
on the valid value of candidate_xid to ensure that apply worker didn't
send any request? Note that we always reset candidate_xid once we have
updated oldest_nonremovable_xid.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Ilia Evdokimov | 2025-05-16 09:42:41 | Re: Add comment explaining why queryid is int64 in pg_stat_statements |
Previous Message | vignesh C | 2025-05-16 08:46:19 | Re: Logical Replication of sequences |