Re: 001_rep_changes.pl fails due to publisher stuck on shutdown

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: amit(dot)kapila16(at)gmail(dot)com
Cc: smithpb2250(at)gmail(dot)com, exclusion(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 001_rep_changes.pl fails due to publisher stuck on shutdown
Date: 2024-06-18 08:07:14
Message-ID: 20240618.170714.1092506018778053110.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 13 Jun 2024 09:29:03 +0530, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote in
> Yeah, but the commit you quoted later reverted by commit 703f148e98
> and committed again as c6c3334364.

Yeah, right..

> > aiming to prevent walsenders from
> > generating competing WAL (by, for example, CREATE_REPLICATION_SLOT)
> > records with the shutdown checkpoint. Thus, it seems that the
> > walsender cannot see the shutdown record,
> >
>
> This is true of logical walsender. The physical walsender do send
> shutdown checkpoint record before getting terminated.

Yes, I know. They differ in their blocking mechanisms.

> > and a certain amount of
> > bytes before it, as the walsender appears to have relied on the
> > checkpoint flushing its record, rather than on XLogBackgroundFlush().
> >
> > If we approve of the walsender being terminated before the shutdown
> > checkpoint, we need to "fix" the comment, then provide a function to
> > ensure the synchronization of WAL records.
> >
>
> Which comment do you want to fix?

Yeah. The part you seem to think I was trying to fix is actually
fine. Instead, I have revised the comment on the modified section to
make its intention clearer.

> > I'll consider this direction for a while.
> >
>
> Okay, thanks.

The attached patch is it. It's only for the master.

I decided not to create a new function because the simple code has
only one caller. I haven't seen the test script fail with this fix.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Ensure-WAL-is-written-out-when-terminating-a-logical.patch text/x-patch 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-06-18 08:37:30 Re: Conflict Detection and Resolution
Previous Message Alvaro Herrera 2024-06-18 07:57:44 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.