Re: pg_basebackup stream xlog to tar

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_basebackup stream xlog to tar
Дата
Msg-id CAB7nPqTO243vVeXPgRLr7PeaecoLVLrt7xs18ms+2rs7m=sh+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_basebackup stream xlog to tar  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Sun, Oct 23, 2016 at 10:52 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Sun, Oct 23, 2016 at 10:30 PM, Magnus Hagander <magnus@hagander.net> wrote:
>> I think both of those would be worthwhile. Just for the testability in
>> itself, but such a flag to pg_xlogdump would probably be useful in other
>> cases as well, beyond just the testing.
>
> Looking quickly at the code, it does not seem that complicated... I
> may just send patches tomorrow for all those things and be done with
> it, all that on its new dedicated thread.

Actually not that much after noticing that pg_xlogdump emulates some
of the backend's StringInfo routines and calls at the end vprintf() to
output everything to stdout, which is ugly. The cleanest solution here
would be to make StringInfo a bit more portable and allow them for
frontends, somehting that may be useful for any utility playing with
rm_desc. A less cleaner solution would be to somewhat store a fd
pointing to a file (or stdout) into compat.c and output to it. I'd
slightly prefer the first solution, but that does not seem worth the
effort just for pg_xlogdump and one test.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [BUG] pg_basebackup from disconnected standby fails
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pg_basebackup stream xlog to tar