agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Orphaned Files in PostgreSQL
Date: Fri, 21 Aug 2026 06:55:19 +0000
Message-ID: <aof2V2jdcD67HPeO@bdtpg> (raw)
In-Reply-To: <CAE9k0Pnd3fAGGJjxRPv3CqH1AiRB-1Y=4_Ah-XV9hC7ZZQXK_w@mail.gmail.com>
References: <CAE9k0Pno=Mns7J5HA4+bbXzb=yCZnCtSF_wf1ZipCQxardKDjA@mail.gmail.com>
	<CAE9k0Pnd3fAGGJjxRPv3CqH1AiRB-1Y=4_Ah-XV9hC7ZZQXK_w@mail.gmail.com>

Hi,

On Thu, Aug 20, 2026 at 02:40:25PM +0530, Ashutosh Sharma wrote:
> Hi All,
> 
> I am revisiting this thread to propose a possible fix for this known issue.

Thanks for working on this!

> This ordering guarantees that relation storage cannot become durable
> without either a durable marker or WAL capable of reconstructing that
> marker.

I wonder if logging XLOG_SMGR_CREATE before smgrcreate() could interact badly
with a concurrent checkpoint? I looked at [1] and it looks like it used a separate
PRECREATE record and kept the usual CREATE record after physical creation.

Could this be reused here, independently of the rest of its undo infrastructure?

[1]: https://postgr.es/m/CAEepm%3D0ULqYgM2aFeOnrx6YrtBg3xUdxALoyCG%2BXpssKqmezug%40mail.gmail.com

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (12+ messages)  latest in thread

Message-ID: <aof2V2jdcD67HPeO@bdtpg>
Permalink:  ../aof2V2jdcD67HPeO@bdtpg/
Also on:    postgresql.org/message-id/aof2V2jdcD67HPeO@bdtpg

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: pgsql-hackers@postgresql.org
  Cc: bertranddrouvot.pg@gmail.com, ashu.coek88@gmail.com, andres@anarazel.de
  Subject: Re: Orphaned Files in PostgreSQL
  In-Reply-To: <aof2V2jdcD67HPeO@bdtpg>

* 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