Re: basic_archive lost archive_directory

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, Олег Самойлов <splarv(at)ya(dot)ru>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Subject: Re: basic_archive lost archive_directory
Date: 2026-02-09 21:48:05
Message-ID: aYpWFcfk1xueHiCc@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Feb 10, 2026 at 02:46:39AM +0900, Fujii Masao wrote:
> Basically I like the idea of moving the checks for archive_directory from
> check_archive_directory() to basic_archive_configured(). This would not only
> address this issue, but also other problems caused by performing these checks
> in the GUC check hook.

Note that the check_configured_cb is called for every segment to archive.
That means we'd be calling stat() much more, which seems like unnecessary
overhead to me. And we still need to be prepared for the archive directory
to disappear at any time. I'm wondering if it would be better to simply
remove this archive directory existence check from the check_configured_cb.

--
nathan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Bossart 2026-02-09 21:58:01 Re: basic_archive lost archive_directory
Previous Message Sergei Kornilov 2026-02-09 20:09:41 Re: basic_archive lost archive_directory