Re: thinko in basic_archive.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: thinko in basic_archive.c
Date: 2022-10-17 13:15:35
Message-ID: CA+TgmobQbBm-a81MjFy1j2QSt3ECnYVWZuh8jvCt6FW+e5jzWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 14, 2022 at 4:45 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2022-10-17 13:43:58 Re: Question about pull_up_sublinks_qual_recurse
Previous Message kuroda.hayato@fujitsu.com 2022-10-17 13:01:37 RE: [Proposal] Add foreign-server health checks infrastructure