Re: [HACKERS] pg_ctl idempotent option

2013-03-05 Thread Peter Eisentraut
On Mon, 2013-01-14 at 06:37 -0500, Peter Eisentraut wrote: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. So apparently, pg_upgrade needs the existing behavior,

Re: [HACKERS] pg_ctl idempotent option

2013-01-30 Thread Bruce Momjian
On Wed, Jan 30, 2013 at 04:07:45PM +1100, Josh Berkus wrote: I don't think I like --force because it isn't clear if we are forcing the start to have done something, or forcing the server to be running. Do we need this idempotent feature for stop too? Yes, of course. If idempotent

Re: [HACKERS] pg_ctl idempotent option

2013-01-29 Thread Bruce Momjian
On Tue, Jan 29, 2013 at 04:19:15PM +1100, Josh Berkus wrote: OK, I had some time to think about this. Basically, we have three outcomes for pg_ctl start: server not running and pg_ctl start success server start failed server already running Can't we just assign

Re: [HACKERS] pg_ctl idempotent option

2013-01-29 Thread Dimitri Fontaine
Bruce Momjian br...@momjian.us writes: pg_upgrade uses that to find out of the server was already running or if we started it. This is to start the server to remove the postmaster.pid file. Also, no one has explained how not knowing if -o options were used was a safe. What happened to the

Re: [HACKERS] pg_ctl idempotent option

2013-01-29 Thread Peter Eisentraut
On 1/28/13 9:29 PM, Bruce Momjian wrote: pg_upgrade uses that to find out of the server was already running or if we started it. This is to start the server to remove the postmaster.pid file. It's currently a bit missed up anyway. pg_ctl start is successful if the server is already started,

Re: [HACKERS] pg_ctl idempotent option

2013-01-29 Thread Bruce Momjian
On Tue, Jan 29, 2013 at 04:34:50PM -0500, Peter Eisentraut wrote: On 1/28/13 9:29 PM, Bruce Momjian wrote: pg_upgrade uses that to find out of the server was already running or if we started it. This is to start the server to remove the postmaster.pid file. It's currently a bit missed

Re: [HACKERS] pg_ctl idempotent option

2013-01-29 Thread Josh Berkus
I don't think I like --force because it isn't clear if we are forcing the start to have done something, or forcing the server to be running. Do we need this idempotent feature for stop too? Yes, of course. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Asif Naeem
I am working on reviewing the patch. Patch apply without warning/error on master branch. My findings are as following i.e. 1. Behavior change in pg_ctl return value i.e. * * * Server already running* a. Without Patch inst asif$ ./bin/pg_ctl -D data_test/ -l data_test.log start pg_ctl:

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Simon Riggs
On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Bruce Momjian
On Mon, Jan 28, 2013 at 03:40:08PM +, Simon Riggs wrote: On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Bruce Momjian
On Mon, Jan 28, 2013 at 09:29:35PM -0500, Bruce Momjian wrote: On Mon, Jan 28, 2013 at 03:40:08PM +, Simon Riggs wrote: On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Josh Berkus
OK, I had some time to think about this. Basically, we have three outcomes for pg_ctl start: server not running and pg_ctl start success server start failed server already running Can't we just assign different return values to these cases, e.g. 0, 1, 2? We already

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Ashutosh Bapat
On Tue, Jan 29, 2013 at 10:49 AM, Josh Berkus j...@agliodbs.com wrote: OK, I had some time to think about this. Basically, we have three outcomes for pg_ctl start: server not running and pg_ctl start success server start failed server already running Can't we

Re: [HACKERS] pg_ctl idempotent option

2013-01-24 Thread Bruce Momjian
On Thu, Jan 24, 2013 at 09:05:59AM +0530, Ashutosh Bapat wrote: I agree, answering the question, whether the particular attempt of starting a server succeeded or not, will need the current behaviour. Now, question is which of these behaviours should be default? That would work. pg_upgrade

Re: [HACKERS] pg_ctl idempotent option

2013-01-23 Thread Bruce Momjian
On Tue, Jan 22, 2013 at 06:03:28PM +0530, Ashutosh Bapat wrote: On Tue, Jan 15, 2013 at 9:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default

Re: [HACKERS] pg_ctl idempotent option

2013-01-23 Thread Heikki Linnakangas
On 23.01.2013 20:56, Bruce Momjian wrote: On Tue, Jan 22, 2013 at 06:03:28PM +0530, Ashutosh Bapat wrote: anyway, +1 for making this as default option. Going that path, would we be breaking backward compatibility? There might be scripts, (being already used), which depend upon the current

Re: [HACKERS] pg_ctl idempotent option

2013-01-23 Thread Bruce Momjian
On Wed, Jan 23, 2013 at 09:00:25PM +0200, Heikki Linnakangas wrote: On 23.01.2013 20:56, Bruce Momjian wrote: On Tue, Jan 22, 2013 at 06:03:28PM +0530, Ashutosh Bapat wrote: anyway, +1 for making this as default option. Going that path, would we be breaking backward compatibility? There might

Re: [HACKERS] pg_ctl idempotent option

2013-01-23 Thread Ashutosh Bapat
I agree, answering the question, whether the particular attempt of starting a server succeeded or not, will need the current behaviour. Now, question is which of these behaviours should be default? Bruce, what if we make idempotent behaviour default and provide an option for current behaviour?

Re: [HACKERS] pg_ctl idempotent option

2013-01-22 Thread Ashutosh Bapat
On Tue, Jan 15, 2013 at 9:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had

Re: [HACKERS] pg_ctl idempotent option

2013-01-21 Thread Phil Sorber
On Fri, Jan 18, 2013 at 8:48 PM, Phil Sorber p...@omniti.com wrote: +1 Is there more work being done on this, or is the current patch ready to review? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] pg_ctl idempotent option

2013-01-18 Thread Phil Sorber
On Tue, Jan 15, 2013 at 11:06 AM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Vik Reykja
On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped.

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Alvaro Herrera
Vik Reykja escribió: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribió: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? I disagree that we should

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Peter Eisentraut
On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had forgotten to mention that. Since it's already the behavior for start, another option would be to just make it

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Peter Eisentraut
On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but people didn't like that either. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had forgotten to mention that. Since it's already the behavior for

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 10:25:23AM -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribi�: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Bruce Momjian
On Tue, Jan 15, 2013 at 10:55:41AM -0500, Peter Eisentraut wrote: On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Boszormenyi Zoltan
2013-01-15 20:28 keltezéssel, Bruce Momjian írta: On Tue, Jan 15, 2013 at 10:25:23AM -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Vik Reykja escribi�: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Idempotent is a ten-dollar word. Can we find

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Josh Berkus
On 01/15/2013 07:55 AM, Peter Eisentraut wrote: On 1/14/13 10:22 AM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need to consult a dictionary to understand? My suggestion in the original thread was --oknodo, but people didn't like

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Michael Paquier
On Wed, Jan 16, 2013 at 4:29 AM, Bruce Momjian br...@momjian.us wrote: That's Japanese for idempotent. ;-) LOL +1. -- Michael Paquier http://michael.otacoo.com

[HACKERS] pg_ctl idempotent option

2013-01-14 Thread Peter Eisentraut
Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. The previous discussion was at http://www.postgresql.org/message-id/1253165415.18853.32.ca...@vanquo.pezone.net. diff

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar word. Can we find something that average

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Alvaro Herrera
Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar word. Can we find

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped.

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Thom Brown
On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Boszormenyi Zoltan
2013-01-14 16:22 keltezéssel, Tom Lane írta: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar