From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <akapila(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Preserve conflict-relevant data during logical replication. |
Date: | 2025-09-10 09:10:55 |
Message-ID: | CAA4eK1KtGYqgan+TSJ_+6rozHUu00NYtAMbEJy0RagK3fFp58w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Sep 3, 2025 at 5:10 PM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Tuesday, September 2, 2025 11:03 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >
> > On Wed, Jul 23, 2025 at 11:44 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> > wrote:
> >
> > If it is in fact important to acquire the commit timestamp after setting
> > delayChkptFlags, you'd hope this would lead to a test failure, but it doesn't for
> > me. I understand it probably requires an injection point to be certain of hitting
> > the race condition, but I think that would be worth doing. Otherwise, if
> > something gets broken here by accident, it might be a long time before anyone
> > notices.
>
> Thanks for pointing it out!
>
> I agree that adding a test is valuable to mitigate the risk of future code
> changes. We added a similar safeguard for the RecordTransactionCommit() function
> by adding Assert(xactStopTimestamp == 0) after marking the DELAY_CHKPT_xxx flag,
> and did not do any precautionary check for RecordTransactionCommitPrepared as
> the code to acquire the timestamp and setting flag was close by and had explicit
> comments.
>
> I'll prepare a test case that uses the injection point and share it in the
> original thread.
>
The test for this case is added in commit
6456c6e2c4ad1cf9752e09cce37bfcfe2190c5e0.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-09-10 11:39:46 | pgsql: Fix CREATE TABLE LIKE with not-valid check constraint |
Previous Message | Michael Paquier | 2025-09-10 05:25:48 | pgsql: Remove dynahash.h |
From | Date | Subject | |
---|---|---|---|
Next Message | Zsolt Parragi | 2025-09-10 09:12:24 | Re: OAuth client code doesn't work with Google OAuth |
Previous Message | Alyona Vinter | 2025-09-10 09:07:35 | Re: Timeline switching with partial WAL records can break replica recovery |