Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
От | Andrey Borodin |
---|---|
Тема | Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line |
Дата | |
Msg-id | 0B43C5FA-5DE7-4669-88E0-486425F078C3@yandex-team.ru обсуждение исходный текст |
Ответ на | [Patch] pg_rewind: options to use restore_command from recovery.confor command line (Alexey Kondratov <a.kondratov@postgrespro.ru>) |
Ответы |
Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
|
Список | pgsql-hackers |
19 окт. 2018 г., в 22:49, Alexey Kondratov <a.kondratov@postgrespro.ru> написал(а):I expect, that it will be a good idea to allow pg_rewind to look for a restore_command
I think it is better to load restore_command from recovery.conf.I prepared a proof of concept patch (please, find attached), which does exactly what I described above. I played with it a little and it seems to be working, tests were accordingly updated to verify this archive retrieval functionality too.
Patch is relatively simple excepting the one part: if we want to parse recovery.conf (with all possible includes, etc.) and get restore_command, then we should use guc-file.l parser, which is heavily linked to backend, e.g. in error reporting part. So I copied it and made frontend-safe version guc-file-fe.l. Personally, I don't think it's a good idea, but nothing else came to mind. It is also possible to leave the only one option -- passing restore_command as command line argument.
В списке pgsql-hackers по дате отправления: