public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Sergei Kornilov <[email protected]>
Cc: Олег Самойлов <[email protected]>
Cc: [email protected]
Cc: Álvaro Herrera <[email protected]>
Subject: Re: basic_archive lost archive_directory
Date: Wed, 11 Feb 2026 15:14:15 -0600
Message-ID: <aYzxJy0icsGM1A6u@nathan> (raw)
In-Reply-To: <aYtXgaKfiYpaqQyW@nathan>
References: <[email protected]>
<[email protected]>
<1317421770387925@cea5cfd9-50d3-4d85-a924-a7cc75f8f215>
<CAHGQGwF3tFP=oQgYHoS3h9TMeFbZwXc6+xdPTW8CkMV2TkjTmg@mail.gmail.com>
<aYpYaRipZ_-lYxNY@nathan>
<CAHGQGwFzC+HYEwJGhpmu1NBiQp_Ln8t0z9CDt8QCQDnUtFAFYA@mail.gmail.com>
<aYtXgaKfiYpaqQyW@nathan>
On Tue, Feb 10, 2026 at 10:06:25AM -0600, Nathan Bossart wrote:
> As I mentioned upthread, IMHO we should simply remove the existence check
> from the GUC check hook. basic_archive must already be written to handle
> the archive directory disappearing at any moment, so we should be able to
> rely on it without the extra stat().
Concretely, like the attached.
--
nathan
From e89acb5ad9c37d79374f9b1084b594c9c8e47a0a Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
Date: Wed, 11 Feb 2026 15:10:27 -0600
Subject: [PATCH v1 1/1] basic_archive: Allow archive directory to be missing
at startup.
---
contrib/basic_archive/basic_archive.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/contrib/basic_archive/basic_archive.c b/contrib/basic_archive/basic_archive.c
index 6c7f985d48b..8c7e9be624f 100644
--- a/contrib/basic_archive/basic_archive.c
+++ b/contrib/basic_archive/basic_archive.c
@@ -90,13 +90,11 @@ _PG_archive_module_init(void)
/*
* check_archive_directory
*
- * Checks that the provided archive directory exists.
+ * Checks that the provided archive directory path isn't too long.
*/
static bool
check_archive_directory(char **newval, void **extra, GucSource source)
{
- struct stat st;
-
/*
* The default value is an empty string, so we have to accept that value.
* Our check_configured callback also checks for this and prevents
@@ -115,17 +113,6 @@ check_archive_directory(char **newval, void **extra, GucSource source)
return false;
}
- /*
- * Do a basic sanity check that the specified archive directory exists. It
- * could be removed at some point in the future, so we still need to be
- * prepared for it not to exist in the actual archiving logic.
- */
- if (stat(*newval, &st) != 0 || !S_ISDIR(st.st_mode))
- {
- GUC_check_errdetail("Specified archive directory does not exist.");
- return false;
- }
-
return true;
}
--
2.50.1 (Apple Git-155)
Attachments:
[text/plain] v1-0001-basic_archive-Allow-archive-directory-to-be-missi.patch (1.6K, 2-v1-0001-basic_archive-Allow-archive-directory-to-be-missi.patch)
download | inline diff:
From e89acb5ad9c37d79374f9b1084b594c9c8e47a0a Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
Date: Wed, 11 Feb 2026 15:10:27 -0600
Subject: [PATCH v1 1/1] basic_archive: Allow archive directory to be missing
at startup.
---
contrib/basic_archive/basic_archive.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/contrib/basic_archive/basic_archive.c b/contrib/basic_archive/basic_archive.c
index 6c7f985d48b..8c7e9be624f 100644
--- a/contrib/basic_archive/basic_archive.c
+++ b/contrib/basic_archive/basic_archive.c
@@ -90,13 +90,11 @@ _PG_archive_module_init(void)
/*
* check_archive_directory
*
- * Checks that the provided archive directory exists.
+ * Checks that the provided archive directory path isn't too long.
*/
static bool
check_archive_directory(char **newval, void **extra, GucSource source)
{
- struct stat st;
-
/*
* The default value is an empty string, so we have to accept that value.
* Our check_configured callback also checks for this and prevents
@@ -115,17 +113,6 @@ check_archive_directory(char **newval, void **extra, GucSource source)
return false;
}
- /*
- * Do a basic sanity check that the specified archive directory exists. It
- * could be removed at some point in the future, so we still need to be
- * prepared for it not to exist in the actual archiving logic.
- */
- if (stat(*newval, &st) != 0 || !S_ISDIR(st.st_mode))
- {
- GUC_check_errdetail("Specified archive directory does not exist.");
- return false;
- }
-
return true;
}
--
2.50.1 (Apple Git-155)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: basic_archive lost archive_directory
In-Reply-To: <aYzxJy0icsGM1A6u@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox