Re: parallelizing the archiver - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: parallelizing the archiver
Date
Msg-id D0664258-CD16-4D8D-A4E2-BA72AE593F99@yandex-team.ru
Whole thread Raw
In response to Re: parallelizing the archiver  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers

> 10 сент. 2021 г., в 19:19, Julien Rouhaud <rjuju123@gmail.com> написал(а):
> Wouldn't it be better to
> have a new archive_mode, e.g. "daemon", and have postgres responsible
> to (re)start it, and pass information through the daemon's
> stdin/stdout or something like that?

We don't even need to introduce new archive_mode.
Currently archive_command has no expectations regarding stdin\stdout.
Let's just say that we will push new WAL names to stdin until archive_command exits.
And if archive_command prints something to stdout we will interpret it as archived WAL names.
That's it.

Existing archive_commands will continue as is.

Currently information about what is archived is stored on filesystem in archive_status dir. We do not need to change
anything.
If archive_command exits (with any exit code) we will restart it if there are WAL files that still were not archived.

Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: parallelizing the archiver
Next
From: Mark Dilger
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY