Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vpVLd-009zM5-1q for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Feb 2026 17:46:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vpVLc-00Bur2-1c for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Feb 2026 17:46:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vpVLc-00Buqu-0m for pgsql-bugs@lists.postgresql.org; Mon, 09 Feb 2026 17:46:56 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vpVLZ-00000001qwF-3rej for pgsql-bugs@lists.postgresql.org; Mon, 09 Feb 2026 17:46:55 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-45c9fdf2a06so3149172b6e.2 for ; Mon, 09 Feb 2026 09:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770659212; cv=none; d=google.com; s=arc-20240605; b=hv1DhXge4dLZdScCNTImtC49ciJnYZ/LPWUPW9vpPRpUNaj1RsiziMgeP19Gq7ArLz 0tnPqO4nwjNHf1beF59txSzMnvxeXHAXrUNvLBH5vEt7MzIVVOXsDOhhSma9jVCQxZns 3hPuYrFAF5I0eGva0UouvLFW8b4moT9UXYBozwelnpR2LWq67+vSydsIBxq40zqlioR7 yT8g860AZDFTcLBuk0TG6ylvMQRqrPE405q0DxVHNi77jTj6nnzhyuGMOOOvyvN3+Xf8 +brlEaKa06g4TLu1sW8HHCIAATH8BbBTCsLyg/ufO1/gy6/vPoPUbIorf23WMBW5BSI/ 6apQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=46S8wtEU9rN9DWK3yv2Cdn8U0T+1+3H84Hpo/a5YLCA=; fh=WkoLu0nQKQJdGUlMPpfMemL9B/WJE3cKs1NtLtEsmis=; b=U6Vr9wLYd/dAU33VrfobQ7B3BOvHGWw07lw/ytuGFOY1CMyp4qV2rBJkHVixlVi8BI zMh1VtGXGE6fwYrbA1qJ18GG33Y4sYVcA1MEuTN42cZEWwR2dSul57f1w/BBLHv8OEZ0 aMziX7EcvyirrlNjexnE/Fx6Tx5NhIEDnDI9/J3CXEiMXjvqLlBaieGVuyB3UP4BT4j6 5STfNQiDaCiRQHzUwllC6a/E/zt8rWwLqfHVopWPaJ1pakEv/HAUf+kBfzkSEwmfdmYZ +uBBM4n+Y7YuJdd8WpADylbXTxg0/kFkJc3x3xZBFIij18WtztdVLl6tV1QiY68iOFUX JlmA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770659212; x=1771264012; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=46S8wtEU9rN9DWK3yv2Cdn8U0T+1+3H84Hpo/a5YLCA=; b=Vpw2IbwZ6noBjyUCIXzSV8igXJgI3zlCW+QVJQXPMESjAFnq5p/GKOqBDUTEBVZOdw 3xf/M284tMkdtKLQtDFzO/S0v/xBB00yd8f9PQkLi9zCQxmg77z/JtWX1gCQl4jDVUje 7hUfOxqJo+1GH/I5W9jVsOV92hPOXoTAYuG4anKyUE8t5qAk+Gh1hp374kaKZ56iToUd 4zY5n/3Mhgo7oas17vEKlYhmP4amjSNiaSuKvJA4+FlqkCcnoLsim+ZpEDFiLo+yghrO i6Q557nsfITk+7tmMe1HDnp1uHSMXF+yjl88eMRAzIug4ifQ+5trKqMzhajYmvsGeNs5 1y0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770659212; x=1771264012; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=46S8wtEU9rN9DWK3yv2Cdn8U0T+1+3H84Hpo/a5YLCA=; b=WFf6mM+lxu/zPtCGgc2t0whUxY63s0tdtAIe25sOyvqP5VK3UDDOrZReDEzVAU7IOg W0q45mto2hzTyzQVuoIwjCqof9m4tv7ajU2U256r+NY6UbaePF8WYBHCtLv2wF0qvNxf 6yVs1Ebcv2YrTZo+Ks0Pe4QVuMCX32f38Oo4V+w5MQk59EFLaJxQJDky1SgNGHaY4toV NWVfqOF67MXi6R/ixcul7ytjMsXzQPOAyQePNoIuUFfn/pHLiorYI+NW98MnQoC6AOh6 Bl1uc3ghotWu9qTQ5JWFKn6ZbYlQNB3shjUzyDHAPqZ6DCJuXpzO0QcU0emEzX223In7 kb/g== X-Forwarded-Encrypted: i=1; AJvYcCWlyBj8Gbe51wpHHM5gXbdqbm5lcU3gmnTgbuEaYyK2ueqewF1SGNYdEUh0xvTzd4Ky59ZferoQV/Kr@lists.postgresql.org X-Gm-Message-State: AOJu0YxiAaUO91BLGbcT3YaVTj8yXOvbd6CuV1MR5qcCGXAtscjgN7yn UdLINAHXGyHhdbl8Fwi5iVGgworYVOcibQVExlfZp1QPgSISlGuOztumXPw8adMPZHmv4/ReP93 X/dXgXrhWmeD1t2md7Cxmvt9bf+DDG+A= X-Gm-Gg: AZuq6aI5iA66sHKW6XEK4rbXWnFG/k9EJdiBmaGDF9ZOnXOdRO8Sn28ic5AoYVlwDrp IBMqZ7b3mN3KS3qFulxlr2xzZTWiwn71e6afTGLpTph78s8l7ec6QJWPlqnTL/2MBfpBq+G08fY JrEaIkqRm3dXyMVBFIjdaGyP/igD1RwbzPJZwt3nQ7qyYAdl93w+6TjrrL48KfwkBMS+sPoCXQM Q3G7psxv0BxrhzgQdnzTP0LHA2bD+srMEKryf90P9lpHRVxwz0zumwyzf92+eixsS7yGud/Soz7 agXizDgN8DecaWW5eDMzE9EXxa6pDw== X-Received: by 2002:a05:6820:4a0d:b0:66e:466d:8de7 with SMTP id 006d021491bc7-66e466d91a4mr2985776eaf.33.1770659212242; Mon, 09 Feb 2026 09:46:52 -0800 (PST) MIME-Version: 1.0 References: <202601301728.sfkizrto3t5i@alvherre.pgsql> <9b9341b0-942e-4d34-b94f-92bd918fad04@ya.ru> <1317421770387925@cea5cfd9-50d3-4d85-a924-a7cc75f8f215> In-Reply-To: <1317421770387925@cea5cfd9-50d3-4d85-a924-a7cc75f8f215> From: Fujii Masao Date: Tue, 10 Feb 2026 02:46:39 +0900 X-Gm-Features: AZwV_QiZ3Qnz9iUKPdCHxfXNB0ErBOVznwB12_fS56fGVCBYzsqK2csNVD9Od00 Message-ID: Subject: Re: basic_archive lost archive_directory To: Sergei Kornilov Cc: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= , pgsql-bugs@lists.postgresql.org, =?UTF-8?Q?=C3=81lvaro_Herrera?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 6, 2026 at 11:25=E2=80=AFPM Sergei Kornilov wrote= : > > Hello > > How to reproduce: > > 1) configure > > archive_mode =3D on > archive_library =3D 'basic_archive' > basic_archive.archive_directory =3D '/some/path/' > > 2) start postgres and verify archive works > 3) make this directory temporary inaccessible. NFS will give you many way= s to achieve this, here just mv /some/ /some_moved/ is enough. > 4) basic_archive will complain ERROR: could not create file ... No such = file or directory for new WAL archive attempts > 5) restart archiver process with any reason: kill it or restart postgres > 6) make archive_directory accessible again: archiver process will not che= ck the directory's existence again and continue to complain about unconfigu= red archive_directory Yes, this issue can last until, for example, the configuration is reloaded = and archive_directory is set again. I agree this needs to be addressed. > Maybe it makes sense to move the directory existence check from check_arc= hive_directory (guc check callback) to basic_archive_configured? (attached) Basically I like the idea of moving the checks for archive_directory from check_archive_directory() to basic_archive_configured(). This would not onl= y address this issue, but also other problems caused by performing these chec= ks in the GUC check hook. basic_archive is usually loaded only by the archiver via archive_library. In that case, errors reported by check_archive_directory() are not logged by default, since GUC check hook errors are normally emitted only by the postmaster. As a result, misconfigurations (e.g., a non-existent archive_directory) may go unnoticed, which is problematic for users. Moving the checks currently done in check_archive_directory() to basic_archive_configured() would resolve this, which is one reason I like your proposal. In your patch, only the existence check is moved to basic_archive_configure= d(). Would it also make sense to move the filename length check there? If so, we could potentially remove the check_archive_directory GUC check hook enti= rely. Regards, --=20 Fujii Masao