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 1vvkck-00HapK-0V for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Feb 2026 23:18:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvkci-00GBb2-0l for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Feb 2026 23:18:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvkch-00GBak-3A for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 23:18:23 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvkcf-00000001NhC-0e90 for pgsql-bugs@lists.postgresql.org; Thu, 26 Feb 2026 23:18:23 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-676815e147dso504211eaf.3 for ; Thu, 26 Feb 2026 15:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772147901; cv=none; d=google.com; s=arc-20240605; b=G67y0eyD3SAJZWOB5qtcmyHC/tnfqivDtV4Y+rlQpWUe+Tua/HmZT5X6h0X60K1X2Y NlBB7i7c8Z/icw0A5zrgq/OGd0j2mXnVbGN/DmmnoB05R0n61I/p9DiiWxKHKdUTAAGl 1XsPueu0nPWH/gtnKqqYCEJqgxP2LFqZjk4vOPdMjn2/R5mJzlEwFkgw49+tJHu9q5DR 5GaVoXeaG02v//CEIriNmwj6U8esp8VzkaTXHN/XZjmVBeiZLOyGCeJk/pzzxrd1cJts /SwfGqsmE1qZO6SJBXt9OwCuBMywFeVtfivpi0Gho7hAzAzyMRHntRq2I31X8HB5J0rW boxA== 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=W+2nKibyawBkFiFWGSGvVehqJfSwOlRVc+hw97vf7uw=; fh=Nnrl5/auk34N3VLK3xs9CRGlAM4K/ciwaidocghmsFE=; b=CsjPKMMGdBN6mr5EsTIfSH9ToGVbP3TURRMy6NKD3BtkAM0Wda2StzDgBFlxf5OOAH oikeAXxR8+7tZgIYD9gJmimgpviw5Gz9u9vuU4/e/1o9C2qx5kYweDNgEvziUBGFChCw L5g7thE0OcNzGUMPuVR053z2rU6pxzPYThVIgpY3dqiYbHimx3eofEO2RpJ7cV4T60IJ LAcWc8wbR4NAx/+rCpUEuy2jToOVFsnVBrQjcyu8CzDIj/En1ACIuKmGOkLZi25Ljgnu baEbB1PC+tJd8asPiQQSovjTGKcb47/AlPFOpZJCoh/4pELBy+z3AY4qgobJoNfJeitJ 4y8w==; 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=1772147901; x=1772752701; 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=W+2nKibyawBkFiFWGSGvVehqJfSwOlRVc+hw97vf7uw=; b=Eeszb2aYq2vJeXl5CL188/RsReoG3eUsTnql+Hw6hIAR0iO+YHnKxVbNZayODfi/IE t6hYTjjQSZfNIZFOG+/ASqmktlwJ4fneC3y43X4lQS5he+R6/JxhgkPTe0iAZ4xCYy34 sEfpFqimAMSZgngGw9rOfUPS2u87ygABovL0iITtJfBnvrZN014hvZ5CBrCBrNI1Endx CiHpYeZTrGFMsoIqyGuEBOhOlQfxYG5Bh4WVolL5II1bFAPbwp8n68qm7qZ0SuyE6+EB UfEPC7ZfrqOqFYVgskLMIhXK0BKKy6rWqHEbXe7bFk9QVBDFGTOubuo0ZQalS1/OLLY+ OqIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772147901; x=1772752701; 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=W+2nKibyawBkFiFWGSGvVehqJfSwOlRVc+hw97vf7uw=; b=FPMowKQ9N/XVntp3b3tXaK+kxNSEeoTNxocsl11WHG1con5LQMpQysX9Zqkjsnvh95 3sLFVIpL9yb4c/AHKZqr//PohJSLwhZ5Muabv+tnvl3n3aNSt4jKQUTSd54CZKtpKFWl YB+34ZYiolG+h/kN8cp5WLw3J9MYG3rAbASc7AJLFHKVxCbNYxtoDBSRviLqUt7nVox8 YCdWrluQOnbnq2sx+Yb//RIieSCFuBhuKUxZSGHGju8VW9nbYGJwN3Olg2mcZNTc5WhO QprO8ppGmGtcBElE8o8UV767CS2E9r/Hac2NrKMDAOdkbnVOnqoA1NquY1NTAkJlcz1M ip5w== X-Forwarded-Encrypted: i=1; AJvYcCUODYRHspDO/RtPMm7UxHW0bE2Ob+Tzr5Zp62+SnWZbu5cDi9qn8YMw0XqlxC2aMt57VGukE5gK/LA2@lists.postgresql.org X-Gm-Message-State: AOJu0YzM/6CooCt99U7rUq00cpEBe3IJfZTvV/9iwoFTSN0RQS1Df8ZI L72lMuSraHaXN34jlUlXhoa/E8IUMFfpPguyemvO97AB4LRgYranpOvRafikuabUoQgguIbEIyD NHVmuMdrYqGOOOIw388hTacRIGOVYJmk= X-Gm-Gg: ATEYQzxWD31rM5PzaBoWUpH9RhQIQ4UBsAfGk8ulMvjPFMr9H8wCtrjZbDQhXW4/8lS DcDHotnCm4Oab2nBZ3xxWVUgV2ItOkkjVuP18ANGCRig2ymDfhYvcc6MOLkI8u9aWjxLGLEUqB1 o4RV5q7lqevX/M4npUvzIkMEyrAyXYD7n5Ei4c8G/h4sWtXDyk3bRy2cXhPzoOeT0alTtgWjWoQ 9fqE0bDoCOy9CP23h1j7/iNMBnoJ3APAz/iF+RTOcsbtjhmK1nM6JjLh+32yDQzH7xx1PfoUm4e qUg3dtajh9kM8FZMdgGd9vHwAFBKlWwNFHrfuVEe1o5Au3/68+Ee X-Received: by 2002:a05:6820:178e:b0:678:1305:bf2e with SMTP id 006d021491bc7-679faef8a60mr605505eaf.38.1772147901552; Thu, 26 Feb 2026 15:18:21 -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: From: Fujii Masao Date: Fri, 27 Feb 2026 08:18:09 +0900 X-Gm-Features: AaiRm51L5glUCRMWm1TPTNCwNBLCJzCqE37LEWogK62FoHdvZ8C2GzIE6lIlzEA Message-ID: Subject: Re: basic_archive lost archive_directory To: Nathan Bossart Cc: Sergei Kornilov , =?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 Wed, Feb 25, 2026 at 2:34=E2=80=AFAM Nathan Bossart wrote: > > On Tue, Feb 24, 2026 at 01:28:50PM +0900, Fujii Masao wrote: > > I agree with removing the check from the GUC check hook. My only concer= n is > > that simply removing it (rather than relocating it) changes the error m= essage > > users see when archive_directory is misconfigured, which may make > > troubleshooting WAL archiving failures slightly harder. > > > > [Current] > > WARNING: invalid value for parameter > > "basic_archive.archive_directory": "not_exists" > > DETAIL: Specified archive directory does not exist. > > > > [With the patch] > > ERROR: could not create file > > "not_exists/archtemp.00000001000000000000000E.80107.1771905339058": No > > such file or directory > > > > One option would be to perform the check in check_configured_cb(), > > but as you noted, that would add an extra stat() call for each WAL arch= iving. > > If that overhead is unacceptable, another approach would be to wrap > > copy_file() in basic_archive_file() with PG_TRY() / PG_CATCH(). On erro= r, > > we could stat() the archive directory and report a clearer reason if it= does > > not exist. > > > > That said, if users are generally fine with the "could not create file"= error, > > I'm ok with the proposed patch (i.e., just removing the check). > > I think it's fine as-is. If something is wrong with the error message, > IMHO we should fix the error message. Adding extra stat() calls to try t= o > give a nicer message might work most of the time, but there are still rac= e > conditions where users will see the original one. But in any case, I > believe the current message style is used in many places, so I don't see = a > strong reason to do anything different here. Ok, so since I seem to be the only one with some reservations about the message, I'm fine with proceeding with the proposed change. Regards, --=20 Fujii Masao