Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-10-25 Thread Michael Paquier
On Sat, Oct 25, 2014 at 1:20 AM, Heikki Linnakangas wrote: > Argh, looks like I forgot the actual code changes required. > I just noticed that pg_controldata and pg_resetxlog don't check for extra > arguments: > $ pg_resetxlog data fds sdf sdf > Transaction log reset I think that it would be good

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-10-24 Thread Heikki Linnakangas
On 10/24/2014 11:36 AM, Michael Paquier wrote: On Thu, Sep 25, 2014 at 12:38 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: On 09/24/2014 05:48 PM, Abhijit Menon-Sen wrote: Updated patches attached. Thanks, applied some version of these. This set of patches has been applied as

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-10-24 Thread Michael Paquier
On Thu, Sep 25, 2014 at 12:38 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: > On 09/24/2014 05:48 PM, Abhijit Menon-Sen wrote: > >> Updated patches attached. >> > > Thanks, applied some version of these. > This set of patches has been applied as b0d81ad but patch 0001 did not make it in

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-25 Thread Heikki Linnakangas
On 09/24/2014 05:48 PM, Abhijit Menon-Sen wrote: Updated patches attached. Thanks, applied some version of these. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
Updated patches attached. -- Abhijit >From b3bd465357f96ebf1953b3a98f25fb51bac5eb26 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Wed, 24 Sep 2014 16:26:00 +0530 Subject: Make pg_controldata ignore a -D before DataDir --- doc/src/sgml/ref/pg_controldata.sgml| 5 +++-- src/bin/pg_c

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > P.S. Trivia: I can't find any other options in Postgres where the > argument is mandatory but the option is optional. psql behaves similarly with its -d and -U switches also; note --help: Usage: psql [OPTION]... [DBNAME [USERNAME]] ... -d, --dbname=DBNAME data

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Heikki Linnakangas
On 09/24/2014 04:49 PM, Abhijit Menon-Sen wrote: At 2014-09-24 09:25:12 -0400, t...@sss.pgh.pa.us wrote: What's so hard about [ -D ] before the datadir argument? I'm sorry to have given you the impression that I objected to it because it was hard. Since I proposed the same thing a few lines a

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
At 2014-09-24 09:25:12 -0400, t...@sss.pgh.pa.us wrote: > > What's so hard about [ -D ] before the datadir argument? I'm sorry to have given you the impression that I objected to it because it was hard. Since I proposed the same thing a few lines after what you quoted, I guess I have to agree it's

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Tom Lane
Abhijit Menon-Sen writes: > At 2014-09-24 16:02:29 +0300, hlinnakan...@vmware.com wrote: >> Thanks. Please update the docs and usage(), too. > I'm sorry, but I don't think it would be an improvement to make the docs > explain that it's valid to use either "-D datadir" or specify it without > an o

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
To put it another way, I doubt any of the people who were surprised by it looked at either the usage message or the docs. ;-) -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
At 2014-09-24 16:02:29 +0300, hlinnakan...@vmware.com wrote: > > Thanks. Please update the docs and usage(), too. I'm sorry, but I don't think it would be an improvement to make the docs explain that it's valid to use either "-D datadir" or specify it without an option. If both commands were chang

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Heikki Linnakangas
On 09/24/2014 02:21 PM, Abhijit Menon-Sen wrote: At 2014-09-24 14:03:41 +0300, hlinnakan...@vmware.com wrote: Ah, I frequently run into that too; but with pg_resetxlog. Well, that's no fun. Patch attached. Thanks. Please update the docs and usage(), too. - Heikki -- Sent via pgsql-hacke

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Thom Brown
On 24 September 2014 12:04, Magnus Hagander wrote: > On Wed, Sep 24, 2014 at 12:59 PM, Abhijit Menon-Sen > wrote: > > Hi. > > > > I can never remember that pg_controldata takes only a dirname rather > > than "-D dirname", and I gather I'm not the only one. Here's a tiny > > patch to make it work

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Alvaro Herrera
Magnus Hagander wrote: > On Wed, Sep 24, 2014 at 12:59 PM, Abhijit Menon-Sen > wrote: > > Hi. > > > > I can never remember that pg_controldata takes only a dirname rather > > than "-D dirname", and I gather I'm not the only one. Here's a tiny > > patch to make it work either way. As far as I can

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Rajeev rastogi
On 24 September 2014 17:15, Michael Paquier Wrote: > On Wed, Sep 24, 2014 at 7:59 PM, Abhijit Menon-Sen > wrote: > > I can never remember that pg_controldata takes only a dirname rather > > than "-D dirname", and I gather I'm not the only one. Here's a tiny > > patch to make it work either way.

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Michael Paquier
On Wed, Sep 24, 2014 at 7:59 PM, Abhijit Menon-Sen wrote: > I can never remember that pg_controldata takes only a dirname rather > than "-D dirname", and I gather I'm not the only one. Here's a tiny > patch to make it work either way. As far as I can see, it doesn't > break anything, not even if y

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
At 2014-09-24 14:03:41 +0300, hlinnakan...@vmware.com wrote: > > Ah, I frequently run into that too; but with pg_resetxlog. Well, that's no fun. Patch attached. -- Abhijit >From 23fc4d90d0353e1c6d65ca5715fc0338199f01cf Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Wed, 24 Sep 2014 16:48

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Heikki Linnakangas
On 09/24/2014 01:59 PM, Abhijit Menon-Sen wrote: Hi. I can never remember that pg_controldata takes only a dirname rather than "-D dirname", and I gather I'm not the only one. Here's a tiny patch to make it work either way. As far as I can see, it doesn't break anything, not even if you have a d

Re: [HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Magnus Hagander
On Wed, Sep 24, 2014 at 12:59 PM, Abhijit Menon-Sen wrote: > Hi. > > I can never remember that pg_controldata takes only a dirname rather > than "-D dirname", and I gather I'm not the only one. Here's a tiny > patch to make it work either way. As far as I can see, it doesn't > break anything, not

[HACKERS] make pg_controldata accept "-D dirname"

2014-09-24 Thread Abhijit Menon-Sen
Hi. I can never remember that pg_controldata takes only a dirname rather than "-D dirname", and I gather I'm not the only one. Here's a tiny patch to make it work either way. As far as I can see, it doesn't break anything, not even if you have a data directory named "-D". -- Abhijit >From 15d43a3