Re: basic_archive lost archive_directory

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Sergei Kornilov <sk@zsrv.org>, Олег Самойлов <splarv@ya.ru>, pgsql-bugs@lists.postgresql.org, Álvaro Herrera <alvherre@kurilemu.de>
Date: 2026-02-09T21:48:05Z
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



Commits

  1. basic_archive: Allow archive directory to be missing at startup.