Re: thinko in basic_archive.c - Mailing list pgsql-hackers

From Robert Haas
Subject Re: thinko in basic_archive.c
Date
Msg-id CA+TgmobQbBm-a81MjFy1j2QSt3ECnYVWZuh8jvCt6FW+e5jzWg@mail.gmail.com
Whole thread Raw
In response to Re: thinko in basic_archive.c  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: thinko in basic_archive.c  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Fri, Oct 14, 2022 at 4:45 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> What happens to the left-over temp files after a server crash? Will
> they be lying around in the archive directory? I understand that we
> can't remove such files because we can't distinguish left-over files
> from a crash and the temp files that another server is in the process
> of copying.

Yeah, leaving a potentially unbounded number of files around after
system crashes seems pretty unfriendly. I'm not sure how to fix that,
exactly. We could use a name based on the database system identifier
if we thought that we might be archiving from multiple unrelated
clusters to the same directory, but presumably the real hazard is a
bunch of machines that are doing physical replication among
themselves, and will therefore share a system identifier. There might
be no better answer than to suggest that temporary files that are
"old" should be removed by means external to the database, but that's
not an entirely satisfying answer.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: [Proposal] Add foreign-server health checks infrastructure
Next
From: Andy Fan
Date:
Subject: Re: Question about pull_up_sublinks_qual_recurse