Lists: | pgsql-hackers |
---|
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Incorrect log message and checks in pgrecvlogical |
Date: | 2014-08-12 07:28:56 |
Message-ID: | CAB7nPqTNLoFqEPCJYN7=Vo0D5PhSBrFWcNUnYywJPh-gojf54Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
While looking at pg_recvlogical code, I noticed that a couple of error
messages are incorrect when invoking some combinations of --create,
--start or --drop.
For example, here --init should be --create, --stop should be --drop:
$ pg_recvlogical --create --drop --slot foo
pg_recvlogical: cannot use --init or --start together with --stop
Try "pg_recvlogical --help" for more information.
Also, when checking the combination startpos && (create || drop), I
think that we should check that startpos is InvalidXLogRecPtr.
The patch attached fixes all those things. It should be back-patched to 9.4.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20140812_pg_recvllog_fix.patch | text/x-patch | 1.0 KB |
From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Incorrect log message and checks in pgrecvlogical |
Date: | 2014-08-12 11:08:11 |
Message-ID: | 20140812110811.GB14949@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 2014-08-12 16:28:56 +0900, Michael Paquier wrote:
> Hi,
>
> While looking at pg_recvlogical code, I noticed that a couple of error
> messages are incorrect when invoking some combinations of --create,
> --start or --drop.
>
> For example, here --init should be --create, --stop should be --drop:
> $ pg_recvlogical --create --drop --slot foo
> pg_recvlogical: cannot use --init or --start together with --stop
> Try "pg_recvlogical --help" for more information.
>
> Also, when checking the combination startpos && (create || drop), I
> think that we should check that startpos is InvalidXLogRecPtr.
>
> The patch attached fixes all those things. It should be back-patched to 9.4.
Thanks, applied.
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services