Re: [HACKERS] Orphaned files in base/[oid] - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Orphaned files in base/[oid]
Date
Msg-id CA+Tgmoadvr3tQOG-EttHDaLpYPY10YNF8knAzTxYYTuPiKt7Qw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Orphaned files in base/[oid]  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, Aug 14, 2017 at 2:56 PM, Andres Freund <andres@anarazel.de> wrote:
> I think there are some possibilities to close the gap here. We could
> e.g. have <relfilenode>.delete_on_crash marker files that get installed
> when creating a new persistent relfilenode. If we set up things so they
> get deleted post commit, but inside the critical section, we could rely
> on them being present in case of crash, but consistently removed during
> WAL replay. At the end of recovery, iterate over the whole datadir and
> nuke all relations with marker files present.

At the risk of being predictable, I think we should add an undo
subsystem instead of continuing to create ad-hoc solutions to problems
like this.  (Of course, that's being worked on by Thomas, Amit, and
others.)

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] recovery_target_time = 'now' is not an error but stillimpractical setting
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Simplify plpgsql's check for simple expressions.