Re: parallelizing the archiver

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallelizing the archiver
Date: 2021-10-20 22:20:21
Message-ID: 842EA075-CA68-46BB-8FF1-CC98389438AB@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/19/21, 9:14 AM, "Bossart, Nathan" <bossartn(at)amazon(dot)com> wrote:
> My original proof-of-concept also attempted to handle a bunch of other
> shell command GUCs, but perhaps I'd better keep this focused on
> archive_command for now. What we do here could serve as an example of
> how to adjust the other shell command GUCs later on. I'll go ahead
> and rework my patch to look more like what is being discussed here,
> although I expect the exact design for the interface will continue to
> evolve based on the feedback in this thread.

Alright, I reworked the patch a bit to maintain backward
compatibility. My initial intent for 0001 was to just do a clean
refactor to move the shell archiving stuff to its own file. However,
after I did that, I realized that adding the hook wouldn't be too much
more work, so I did that as well. This seems to be enough to support
custom archiving modules. I included a basic example of such a module
in 0002. 0002 is included primarily for demonstration purposes.

I do wonder if there are some further enhancements we should make to
the archiving module interface. With 0001 applied, archive_command is
silently ignored if you've preloaded a library that uses the hook.
There's no way to indicate that you actually want to use
archive_command or that you want to use a specific library as the
archive library. On the other hand, just adding the hook keeps things
simple, and it doesn't preclude future improvements in this area.

Nathan

Attachment Content-Type Size
v3-0001-Move-logic-for-archiving-via-shell-to-its-own-fil.patch application/octet-stream 11.9 KB
v3-0002-Add-an-example-of-a-basic-archiving-module.patch application/octet-stream 6.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-10-20 23:10:57 Re: Added schema level support for publication.
Previous Message Jeff Davis 2021-10-20 21:55:54 Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)