From: Bossart, Nathan <bossartn@amazon.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: archive modules
Date: Tue, 2 Nov 2021 17:27:35 +0000
Message-ID: <A754E8CF-6DB6-45C5-B0AD-6E3DCD3B21CF@amazon.com> (raw)
In-Reply-To: <CA+TgmoZYQN256JuPqbvKOG=DJG5z2m3fgs9WiY7fGgZQM+Qd2Q@mail.gmail.com>
References: <668D2428-F73B-475E-87AE-F89D67942270@amazon.com>
<e437bf15-9917-7b78-f326-90b9c57ba8ae@oss.nttdata.com>
<YYDLd7vsmrYHC+9C@paquier.xyz>
<CA+TgmoYx1hhvmm4BLSJ15XM3ALrM6wyQ4XTesgtdgofSkHXqhA@mail.gmail.com>
<9970BE22-2BC3-49C9-AD68-51983118B701@amazon.com>
<CA+TgmoZfft6oCGYP3agn_Y_v3KPBauBZG60tfTm=_kke+xfvaw@mail.gmail.com>
<EEE89F96-BF41-4DE5-A0EA-8C8BD23BDEE5@amazon.com>
<CA+TgmobM+uOL+qiuv0xDep+KeV9wkdCbkFnSeaDtaHyostqj1g@mail.gmail.com>
<ED59AEC5-AE88-41CF-BC5E-34B32722A398@amazon.com>
<CA+TgmoZYQN256JuPqbvKOG=DJG5z2m3fgs9WiY7fGgZQM+Qd2Q@mail.gmail.com>
On 11/2/21, 9:46 AM, "Robert Haas" <robertmhaas@gmail.com> wrote:
> On Tue, Nov 2, 2021 at 12:39 PM Bossart, Nathan <bossartn@amazon.com> wrote:>
>> On 11/2/21, 9:17 AM, "Robert Haas" <robertmhaas@gmail.com> wrote:
>> You could still introduce GUCs in _PG_init(), but they couldn't be
>> defined as PGC_POSTMASTER.
>
> It seems like PGC_POSTMASTER isn't very desirable anyway. Wouldn't you
> want PGC_SIGHUP? I mean I'm not saying there couldn't be a case where
> that wouldn't work, because you could need a big chunk of shared
> memory allocated at startup time or something. But in that's probably
> not typical, and if it does happen well then that particular archive
> module has to be preloaded. If you know that you have several archive
> modules that you want to use, you can still preload them all if for
> this or any other reason you want to do that. But in a lot of cases
> it's not going to be necessary.
>
> In other words, if we use hooks, then you're guaranteed to need a
> server restart to change anything. If we use something like what you
> have now, there can be corner cases where you need that or benefits of
> preloading, but it's not a hard requirement, and in many cases you can
> get by without it. That seems strictly better to me ... but maybe I'm
> still confused.
>
>> Also, you could still use
>> RegisterDynamicBackgroundWorker() to register a background worker, but
>> you couldn't use RegisterBackgroundWorker(). These might be
>> acceptable restrictions if swapping archive libraries on the fly seems
>> more important, but I wanted to bring that front and center to make
>> sure everyone understands the tradeoffs.
>
> RegisterDynamicBackgroundWorker() seems way better, though. It's hard
> for me to understand why this would be a problem for anybody. And
> again, if somebody does have that need, they can always fall back to
> saying that their particular module should be preloaded if you want to
> use it.
I agree. I'll make sure the archive library can be changed via SIGHUP
in the next revision.
Nathan
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: bossartn@amazon.com, robertmhaas@gmail.com, michael@paquier.xyz, masao.fujii@oss.nttdata.com, sfrost@snowman.net, magnus@hagander.net
Subject: Re: archive modules
In-Reply-To: <A754E8CF-6DB6-45C5-B0AD-6E3DCD3B21CF@amazon.com>
* 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