From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Coverage improvements of src/bin/pg_basebackup and pg_receivewal --endpos |
Date: | 2017-09-06 04:54:38 |
Message-ID: | CAB7nPqTAph+SGFmFEtNv8bxGuvrxwHhXEyViTww6R0XvYbB7sg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 5, 2017 at 10:19 PM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)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
Attachment | Content-Type | Size |
---|---|---|
0001-Implement-pg_receivewal-endpos.patch | text/x-patch | 9.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2017-09-06 05:13:58 | Re: Making clausesel.c Smarter |
Previous Message | Amit Kapila | 2017-09-06 04:34:16 | GatherMerge misses to push target list |