public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fujii Masao <[email protected]>
To: Anthonin Bonnefoy <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record
Date: Fri, 6 Mar 2026 16:48:06 +0900
Message-ID: <CAHGQGwECpyJtMqkCEvyqgZDiwAeMj3RKobui7jONrDd35W0x3Q@mail.gmail.com> (raw)
In-Reply-To: <CAHGQGwGvnpN=2bo+F7H90YLFcx9=SazwLkcx+0gEcrbQy5NVZg@mail.gmail.com>
References: <CAO6_Xqo3co3BuUVEVzkaBVw9LidBgeeQ_2hfxeLMQcXwovB3GQ@mail.gmail.com>
<CAO6_XqrZEREa5d+dyjahX6bteBhoN=8Jid-3a4f6Q35sWrv9eg@mail.gmail.com>
<CAHGQGwHFKF+x4E+SqedMCnmLCitxjTUUtSyL_+mMeuq-GbEt6w@mail.gmail.com>
<CAO6_Xqp+ADb6KZVWLMALu3xmwVUEO8S1EiCnp38mG6BrHrEnuA@mail.gmail.com>
<CAO6_XqqKDV+AuP=Gf4kRKPqzyYTsOyGd3LE8Jqkwi7EMPJpbhA@mail.gmail.com>
<CAHGQGwHc5yH4Nxp59KXJP0kAr61j3W7QeSKT2HxVjZa3OrLzmg@mail.gmail.com>
<CAO6_Xqq1h6kggb1o206rgouPS0H5jnjahzZ0We-9ggnBjB2JsA@mail.gmail.com>
<CAHGQGwFJnNUOMiW9wR-2WjSKzzj0wV8p55J8bnJ6mik=z0oFPQ@mail.gmail.com>
<[email protected]>
<CAO6_Xqq73TPa3M6nQ7RqRhKkcphy1JX7aNGTYy-x_Sn+6a8Z_Q@mail.gmail.com>
<CAHGQGwGvnpN=2bo+F7H90YLFcx9=SazwLkcx+0gEcrbQy5NVZg@mail.gmail.com>
On Fri, Mar 6, 2026 at 8:46 AM Fujii Masao <[email protected]> wrote:
>
> On Thu, Mar 5, 2026 at 5:40 PM Anthonin Bonnefoy
> <[email protected]> wrote:
> > So it was relying on GetInsertRecPtr() instead of
> > GetXLogInsertRecPtr(). As mentioned in the thread, GetInsertRecPtr()
> > only returns the position of the last full xlog page, meaning it
> > doesn't fix the issue we have where the last partial page contains a
> > continuation record.
> >
> > Testing the XLogFlush(GetInsertRecPtr()) patch with my script, I still
> > get the shutdown stuck issue.
> >
> > Using GetXLogInsertRecPtr() is required to make sure the last partial
> > page is correctly flushed.
>
> Since GetXLogInsertRecPtr() returns a bogus LSN and XLogFlush() does
> almost nothing during recovery, I added a !RecoveryInProgress() check
> as follows. I've attached the latest version of the patch and updated
> the commit message.
>
> - if (got_STOPPING)
> - XLogBackgroundFlush();
> + if (got_STOPPING && !RecoveryInProgress())
> + XLogFlush(GetXLogInsertRecPtr());
I've pushed the patch. Thanks!
Regards,
--
Fujii Masao
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record
In-Reply-To: <CAHGQGwECpyJtMqkCEvyqgZDiwAeMj3RKobui7jONrDd35W0x3Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox