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.

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 vi

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

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 Dimitri Fontaine
Bruce Momjian 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 plan for pg_up

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

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Ashutosh Bapat
On Tue, Jan 29, 2013 at 10:49 AM, 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 ju

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

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 wrote: > > > Tom Lane wrote: > > >> Peter Eisentraut writes: > > >> > Here is a patch to add an option -I/--idempotent to pg_c

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 wrote: > > Tom Lane wrote: > >> Peter Eisentraut 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 s

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Simon Riggs
On 14 January 2013 15:29, Alvaro Herrera wrote: > Tom Lane wrote: >> Peter Eisentraut 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. >> >> Ide

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: anoth

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 k

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? On

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? Ther

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 behavi

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 wrote: > > Peter Eisentraut 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 w

Re: [HACKERS] pg_ctl idempotent option

2013-01-22 Thread Ashutosh Bapat
On Tue, Jan 15, 2013 at 9:36 PM, Tom Lane wrote: > Peter Eisentraut 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 t

Re: [HACKERS] pg_ctl idempotent option

2013-01-21 Thread Phil Sorber
On Fri, Jan 18, 2013 at 8:48 PM, Phil Sorber 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: http://www.postgresql.org/mailpref/pgsql-hack

Re: [HACKERS] pg_ctl idempotent option

2013-01-18 Thread Phil Sorber
On Tue, Jan 15, 2013 at 11:06 AM, Tom Lane wrote: > Peter Eisentraut 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

Re: [HACKERS] pg_ctl idempotent option

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

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 > l

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 writes: Vik Reykja escribi�: On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane wrote: Idempotent is a ten-dollar word. Can we find something that average people wouldn't need

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, b

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 writes: > > Vik Reykja escribi�: > >> On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane wrote: > >>> Idempotent is a ten-dollar word. Can we find something that average > >>> people wouldn't need to consult a dictionary to unders

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Tom Lane
Peter Eisentraut 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 start, anothe

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 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 Tom Lane
Alvaro Herrera writes: > Vik Reykja escribió: >> On Mon, Jan 14, 2013 at 4:22 PM, 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? >> I disagree that we should dumb things down when the word m

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 wrote: > > > Peter Eisentraut 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 stopp

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Vik Reykja
On Mon, Jan 14, 2013 at 4:22 PM, Tom Lane wrote: > Peter Eisentraut 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-dolla

Re: [HACKERS] pg_ctl idempotent option

2013-01-15 Thread Dickson S. Guedes
2013/1/14 Tom Lane : > Alvaro Herrera writes: >> Tom Lane wrote: >>> Peter Eisentraut 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. > >>> Ide

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Boszormenyi Zoltan
2013-01-14 16:22 keltezéssel, Tom Lane írta: Peter Eisentraut 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 Thom Brown
On 14 January 2013 15:29, Alvaro Herrera wrote: > Tom Lane wrote: > > Peter Eisentraut 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 Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Peter Eisentraut 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.

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut 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 tha

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Tom Lane
Peter Eisentraut 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 people wouldn't ne

[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 . dif