Lists: | pgsql-hackers |
---|
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_recvlogical not accepting -I to specify start LSN position |
Date: | 2014-05-25 13:35:24 |
Message-ID: | CAB7nPqThXqU3QgNzS3UzmQRv_qjyPTGkbG5px2bq3_d=fJAS4w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi all,
As written in subject, pg_recvlogical does not work properly with
option -I but it should:
$ pg_recvlogical -I 0/0
pg_recvlogical: invalid option -- I
Try "pg_recvlogical --help" for more information.
$ pg_recvlogical --help | grep "\-I"
-I, --startpos=PTR where in an existing slot should the streaming start
Attached patch corrects that, reshuffling at the same time the option
letters parsed with getopt_long in alphabetical order.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20140525_pg_recvlogical_opts.patch | text/x-patch | 469 bytes |
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: pg_recvlogical not accepting -I to specify start LSN position |
Date: | 2014-05-25 17:01:09 |
Message-ID: | 20140525170109.GC18867@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
On 2014-05-25 22:35:24 +0900, Michael Paquier wrote:
> As written in subject, pg_recvlogical does not work properly with
> option -I but it should:
> $ pg_recvlogical -I 0/0
> pg_recvlogical: invalid option -- I
> Try "pg_recvlogical --help" for more information.
> $ pg_recvlogical --help | grep "\-I"
> -I, --startpos=PTR where in an existing slot should the streaming start
Good catch. Apparently only the long argument version ever worked...
> Attached patch corrects that, reshuffling at the same time the option
> letters parsed with getopt_long in alphabetical order.
Hm. Not a big fan of this in isolation. In the attached patch I've
reordered the options to all be ordered alphabetically, but only inside
the section they are in --help.
What do you think?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-pg_recvlogical-to-accept-the-documented-I-instea.patch | text/x-patch | 5.4 KB |
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_recvlogical not accepting -I to specify start LSN position |
Date: | 2014-05-25 23:06:03 |
Message-ID: | CAB7nPqRHn+cpHodtJCKgYq_-UPuE7bAiqAxUGkPjEhvHgoa0HQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, May 26, 2014 at 2:01 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2014-05-25 22:35:24 +0900, Michael Paquier wrote:
>> Attached patch corrects that, reshuffling at the same time the option
>> letters parsed with getopt_long in alphabetical order.
>
> Hm. Not a big fan of this in isolation. In the attached patch I've
> reordered the options to all be ordered alphabetically, but only inside
> the section they are in --help.
>
> What do you think?
That's fine as well. Thanks.
--
Michael