Re: Use durable_unlink for .ready and .done files for WAL segment removal

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use durable_unlink for .ready and .done files for WAL segment removal
Date: 2018-12-04 07:36:04
Message-ID: 20181204073604.GB6859@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 29, 2018 at 03:00:42PM +0000, Bossart, Nathan wrote:
> +1

Okay, here is an updated patch for this stuff, which does the following:
- Check for a WAL segment if it has a ".ready" status file, an orphaned
status file is removed only on ENOENT.
- If durable_unlink fails, retry 3 times. If there are too many
failures, the archiver gives up on the orphan status file removal. If
the removal works correctly, the archiver moves on to the next file.

(The variable names could be better.)
--
Michael

Attachment Content-Type Size
archive-missing-v3.patch text/x-diff 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2018-12-04 07:58:50 Re: [PATCH] Log CSV by default
Previous Message myungkyu.lim 2018-12-04 07:24:25 RE: [Todo item] Add entry creation timestamp column to pg_stat_replication