Re: BUG #17731: Server doesn't start after abnormal shutdown while creating unlogged tables - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17731: Server doesn't start after abnormal shutdown while creating unlogged tables
Date
Msg-id ZGLEKclYp/Fr+4Og@paquier.xyz
Whole thread Raw
In response to Re: BUG #17731: Server doesn't start after abnormal shutdown while creating unlogged tables  (Karina Litskevich <litskevichkarina@gmail.com>)
List pgsql-bugs
On Mon, May 15, 2023 at 03:03:48PM +0300, Karina Litskevich wrote:
> пн, 1 мая 2023 г. в 10:33, Michael Paquier <michael@paquier.xyz>:
> Recovery replays all the WAL records until the last one present. If the server
> was stopped immediately, there could be some records, that represent operations
> of the transaction, which commit or abort record wasn't flushed at the moment
> of the stop.

Yes, that's kind of the key point I was missing when looking first at
this thread: under a DDL that's run in a self-transaction, if we have
the files but not the records able to delete them, then boom.

> As I see now, the problem of operations on files is more than just about this
> particular case. So my fix is not the right solution, and we should rather
> consider Kyotaro's patch.

Yes, right.  Orphan files are a much larger problem, and the unlogged
case is one symptom behind a much larger thing, in look for a solution
that requires, as far as I can see from the discussions, something
much more invasive than what would be acceptable for a backpatch.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Possible to create a hidden collation
Next
From: Tom Lane
Date:
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)