On Sun, Oct 23, 2016 at 10:52 PM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
> On Sun, Oct 23, 2016 at 10:30 PM, Magnus Hagander <mag...@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.

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to