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

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: basic_archive: Allow archive directory to be missing at startup.
Date: 2026-03-02 19:15:18
Message-ID: E1vx8je-0022f8-2V@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

basic_archive: Allow archive directory to be missing at startup.

Presently, the GUC check hook for basic_archive.archive_directory
checks that the specified directory exists. Consequently, if the
directory does not exist at server startup, archiving will be stuck
indefinitely, even if it appears later. To fix, remove this check
from the hook so that archiving will resume automatically once the
directory is present. basic_archive must already be prepared to
deal with the directory disappearing at any time, so no additional
special handling is required.

Reported-by: Олег Самойлов <splarv(at)ya(dot)ru>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Sergei Kornilov <sk(at)zsrv(dot)org>
Discussion: https://postgr.es/m/73271769675212%40mail.yandex.ru
Backpatch-through: 15

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f510577de4f5a0b33453941a08cdb2302dc55f02

Modified Files
--------------
contrib/basic_archive/basic_archive.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-03-02 19:23:45 pgsql: Add commit 7b24959434 to .git-blame-ignore-revs.
Previous Message Heikki Linnakangas 2026-03-02 17:23:55 pgsql: Fix OldestMemberMXactId and OldestVisibleMXactId array usage