Re: [HACKERS] Logical decoding on standby - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] Logical decoding on standby
Date
Msg-id CAMsr+YGkOYtsBs+zs23BdOq20Gsm9TKF3L_yVBmuFnPpGdx9DQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Logical decoding on standby  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] Logical decoding on standby
List pgsql-hackers
On 20 December 2016 at 15:03, Petr Jelinek <petr.jelinek@2ndquadrant.com> wrote:

> But in 0003 I don't understand following code:
>> +     if (endpos != InvalidXLogRecPtr && !do_start_slot)
>> +     {
>> +             fprintf(stderr,
>> +                             _("%s: cannot use --create-slot or --drop-slot together with --endpos\n"),
>> +                             progname);
>> +             fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
>> +                             progname);
>> +             exit(1);
>> +     }
>
> Why is --create-slot and --endpos not allowed together?

Actually, the test is fine, the error is just misleading due to my
misunderstanding.

The fix is simply to change the error message to
                               _("%s: --endpos may only be specified
with --start\n"),

so I won't post a separate followup patch.

Okano Naoki tried to bring this to my attention earlier, but I didn't
understand as I hadn't yet realised you could use --create-slot
--start, they weren't mutually exclusive.

(We test to ensure --start --drop-slot isn't specified earlier so no
test for do_drop_slot is required).

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: [HACKERS] Why does plpython delay composite type resolution?
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] BUG: pg_stat_statements query normalization issues withcombined queries