> 10 сент. 2021 г., в 19:19, Julien Rouhaud <rjuju...@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.

Reply via email to