Re: 001_rep_changes.pl fails due to publisher stuck on shutdown - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: 001_rep_changes.pl fails due to publisher stuck on shutdown
Date
Msg-id CAA4eK1KtynDSbsfggYtYQDfiZg4RhbV=4oY8L2pjF=Ot4CMmQA@mail.gmail.com
Whole thread Raw
In response to Re: 001_rep_changes.pl fails due to publisher stuck on shutdown  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: 001_rep_changes.pl fails due to publisher stuck on shutdown
List pgsql-hackers
On Tue, Jun 11, 2024 at 12:34 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Tue, 11 Jun 2024 11:32:12 +0530, Amit Kapila <amit.kapila16@gmail.com> wrote in
> > Sorry, it is not clear to me why we failed to flush the last
> > continuation record in logical walsender? I see that we try to flush
> > the WAL after receiving got_STOPPING in WalSndWaitForWal(), why is
> > that not sufficient?
>
> It seems that, it uses XLogBackgroundFlush(), which does not guarantee
> flushing WAL until the end.
>

What would it take to ensure the same? I am trying to explore this
path because currently logical WALSender sends any outstanding logs up
to the shutdown checkpoint record (i.e., the latest record) and waits
for them to be replicated to the standby before exit. Please take a
look at the comments where we call WalSndDone(). The fix you are
proposing will break that guarantee.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: use CREATE DATABASE STRATEGY = FILE_COPY in pg_upgrade
Next
From: Michail Nikolaev
Date:
Subject: Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements