From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Supply restore_command to pg_rewind via CLI argument |
Date: | 2021-06-18 12:02:15 |
Message-ID: | 3A92BBEF-D0A6-42BE-8A5E-D90ED829A41C@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers!
Starting from v13 pg_rewind can use restore_command if it lacks necessary WAL segments. And this is awesome for HA clusters with many nodes! Thanks to everyone who worked on the feature!
Here's some feedback on how to make things even better.
If we run 'pg_rewind --restore-target-wal' there must be restore_command in config of target installation. But if the config is not within $PGDATA\postgresql.conf pg_rewind cannot use it.
If we run postmaster with `-c config_file=/etc/postgresql/10/data/postgresql.conf`, we simply cannot use the feature. We solved the problem by putting config into PGDATA only during pg_rewind, but this does not seem like a very robust solution.
Maybe we could add "-C, --target-restore-command=COMMAND target WAL restore_command\n" as was proposed within earlier versions of the patch[0]? Or instruct pg_rewind to pass config to 'postgres -C restore_command' run?
From my POV adding --target-restore-command is simplest way, I can extract corresponding portions from original patch.
Thanks!
Best regards, Andrey Borodin.
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Pyhalov | 2021-06-18 12:02:39 | Re: Asymmetric partition-wise JOIN |
Previous Message | Ajin Cherian | 2021-06-18 11:54:48 | Re: Added schema level support for publication. |