pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Benoit Lobréau <benoit.lobreau@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: David Steele <david@pgmasters.net>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Subject: Re: archive modules
Date: Thu, 13 Oct 2022 11:24:08 -0700
Message-ID: <20221013182408.GA1551106@nathanxps13> (raw )
In-Reply-To: <CALj2ACWAq_gTQ-FhjFvGjhOd5+7qWdepVmYcqsZ_whENshg1zw@mail.gmail.com >
References: <2884265.1663188443@sss.pgh.pa.us >
<20220914211746.GA2986134@nathanxps13 >
<2910705.1663193529@sss.pgh.pa.us >
<20220914222736.GA3042279@nathanxps13 >
<d9d1f7fd-dd99-98f9-8aed-0e976921573b@enterprisedb.com >
<20220923161402.GA736566@nathanxps13 >
<4f66de67-35a0-3fe7-fa61-d618e1bd2c2c@enterprisedb.com >
<20221005185716.GB201192@nathanxps13 >
<1d9cb989-91b0-919e-f42b-4788f5fc7911@enterprisedb.com >
<CALj2ACWAq_gTQ-FhjFvGjhOd5+7qWdepVmYcqsZ_whENshg1zw@mail.gmail.com >
On Thu, Oct 13, 2022 at 03:25:27PM +0530, Bharath Rupireddy wrote:
> The intent here looks reasonable to me. However, why should the user
> be able to set both archive_command and archive_library in the first
> place only to later fail in LoadArchiveLibrary() per the patch? IMO,
> the check_hook() is the right way to disallow any sorts of GUC
> misconfigurations, no?
There was some discussion upthread about using the GUC hooks to enforce
this [0]. In general, it doesn't seem to be a recommended practice. One
basic example of the problems with this approach is the following:
1. Set archive_command and leave archive_library unset and restart
the server.
2. Unset archive_command and set archive_library and call 'pg_ctl
reload'.
After these steps, you'll see the following log messages:
2022-10-13 10:58:42.112 PDT [1562524] LOG: received SIGHUP, reloading configuration files
2022-10-13 10:58:42.114 PDT [1562524] LOG: cannot set "archive_library" when "archive_command" is specified
2022-10-13 10:58:42.114 PDT [1562524] DETAIL: Only one of "archive_library" or "archive_command" can be specified.
2022-10-13 10:58:42.114 PDT [1562524] LOG: parameter "archive_command" changed to ""
2022-10-13 10:58:42.114 PDT [1562524] LOG: configuration file "/home/nathan/pgdata/postgresql.conf" contains errors; unaffected changes were applied
[0] https://postgr.es/m/20220914200305.GA2984249%40nathanxps13
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (102+ messages) latest in thread
Message-ID: <20221013182408.GA1551106@nathanxps13>
Permalink: ../20221013182408.GA1551106@nathanxps13/
Also on: postgresql.org/message-id/20221013182408.GA1551106@nathanxps13
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, bharath.rupireddyforpostgres@gmail.com, peter.eisentraut@enterprisedb.com, tgl@sss.pgh.pa.us, benoit.lobreau@gmail.com, alvherre@alvh.no-ip.org, robertmhaas@gmail.com, bossartn@amazon.com, david@pgmasters.net, masao.fujii@oss.nttdata.com, michael@paquier.xyz, magnus@hagander.net, sfrost@snowman.net
Subject: Re: archive modules
In-Reply-To: <20221013182408.GA1551106@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox