pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers@lists.postgresql.org, Ashutosh Sharma <ashu.coek88@gmail.com>
Subject: Re: Orphaned Files in PostgreSQL
Date: Thu, 24 Sep 2026 10:03:18 +0000
Message-ID: <arT1ZtwN2vtrnZTL@bdtpg> (raw)
In-Reply-To: <CAN4CZFP=oPmqrNq5LU0-rs1giu6x6hjWOD7AOStz3S2JbqvhxA@mail.gmail.com>
References: <CAE9k0Pno=Mns7J5HA4+bbXzb=yCZnCtSF_wf1ZipCQxardKDjA@mail.gmail.com>
	<CAE9k0Pnd3fAGGJjxRPv3CqH1AiRB-1Y=4_Ah-XV9hC7ZZQXK_w@mail.gmail.com>
	<aof2V2jdcD67HPeO@bdtpg>
	<CAE9k0P=BcbT-Z5m+qy-0qhf92CEtTs6nYg5OE=9oLJOAvz2yrg@mail.gmail.com>
	<3BB5E75C-A374-4439-B60F-A539FDAE2055@yandex-team.ru>
	<CAN4CZFP=oPmqrNq5LU0-rs1giu6x6hjWOD7AOStz3S2JbqvhxA@mail.gmail.com>

Hi,

On Wed, Sep 23, 2026 at 03:10:27PM -0700, Zsolt Parragi wrote:
> Hello!
> 
> This issue is also related to a recent discussion about online
> checksums[1] and I tried to look into possible solutions into it when
> investigating that, and I agree that it should be improved.

Indeed. The proposed approach could prevent new orphan files, but it would not
address existing ones or "relation looking" files "manually" added to the data
directory. While the latter can be considered unsupported, they can trigger the
same base backup verification failure.

FWIW, pg_orphaned [1], already provides functions to list, quarantine, restore
and remove such unreferenced files. I wonder if it would be worth considering
adding pg_orphaned, or part of its functionality, to contrib, independently of
this patch?

[1]: https://github.com/bdrouvot/pg_orphaned

Regards,

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






view thread (13+ messages)

Message-ID: <arT1ZtwN2vtrnZTL@bdtpg>
Permalink:  ../arT1ZtwN2vtrnZTL@bdtpg/
Also on:    postgresql.org/message-id/arT1ZtwN2vtrnZTL@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: bertranddrouvot.pg@gmail.com, zsolt.parragi@percona.com, x4mmm@yandex-team.ru, ashu.coek88@gmail.com
  Subject: Re: Orphaned Files in PostgreSQL
  In-Reply-To: <arT1ZtwN2vtrnZTL@bdtpg>
  References: <CAE9k0Pno=Mns7J5HA4+bbXzb=yCZnCtSF_wf1ZipCQxardKDjA@mail.gmail.com> <CAE9k0Pnd3fAGGJjxRPv3CqH1AiRB-1Y=4_Ah-XV9hC7ZZQXK_w@mail.gmail.com> <aof2V2jdcD67HPeO@bdtpg> <CAE9k0P=BcbT-Z5m+qy-0qhf92CEtTs6nYg5OE=9oLJOAvz2yrg@mail.gmail.com> <3BB5E75C-A374-4439-B60F-A539FDAE2055@yandex-team.ru> <CAN4CZFP=oPmqrNq5LU0-rs1giu6x6hjWOD7AOStz3S2JbqvhxA@mail.gmail.com> <arT1ZtwN2vtrnZTL@bdtpg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox