On Tue, Sep 5, 2017 at 10:19 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 6/9/17 02:08, Michael Paquier wrote:
>> I have just played with that, and attached is a patch to implement the
>> so-said option with a basic set of tests, increasing code coverage of
>> pg_receivewal.c from 15% to 60%. I'll park that in the next CF of
>> September.
>
> Looks like a good idea. A couple of thoughts:
Thanks.
> - I think the tests should be written in the style of
> $node->command_fails instead of just command_fails. At least, that's
> how it's done in the pg_basebackup tests.
Good idea.
> - I think the tests will fail if libz support is not built. Again,
> pg_basebackup doesn't have tests for that. So maybe omit that and
> address it later.
Let's address it now. This can be countered by querying pg_config()
before running the command of pg_receivexwal which uses --compress.
> - The variable exit_on_stop seems redundant with time_to_abort. They do
> the same thing, so maybe your patch could reuse it.
Yes, that's doable. time_to_abort does not seem a variable name
adapted to me though if both are combined, so I have renamed that to
time_to_stop, which maps more with the fact that stop can be also
willingly wanted without a SIGINT.
Attached is a new version of the patch.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers