Re: strange pg_ctl's behavior

Lists: pgsql-hackers
From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: strange pg_ctl's behavior
Date: 2008-03-11 09:42:28
Message-ID: 20080311.184228.43013429.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I have encountered a strange pg_ctl's behavior in 8.3.

pg_ctl -w -o "-p 5432" start <-- works
pg_ctl -w -o "-i" start <-- works
pg_ctl -w -o "-p 5432 -i" start <-- doesn't work

In the last case, even postmaster starts successfully, pg_ctl keeps
trying to make sure that postmaster actually started and continues to
print "...".

I now that "-i" is obsoleted, but I think it does not explain well why
pg_ctl behaves like this.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


From: Richard Huxton <dev(at)archonet(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 09:57:54
Message-ID: 47D657A2.20304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tatsuo Ishii wrote:
> Hi,
>
> I have encountered a strange pg_ctl's behavior in 8.3.
>
> pg_ctl -w -o "-p 5432" start <-- works
> pg_ctl -w -o "-i" start <-- works
> pg_ctl -w -o "-p 5432 -i" start <-- doesn't work
>
> In the last case, even postmaster starts successfully, pg_ctl keeps
> trying to make sure that postmaster actually started and continues to
> print "...".

It's not getting confused and thinking the port is "5432 -i" is it? I
tried "-i -p 5432" and that seemed to work.

--
Richard Huxton
Archonet Ltd


From: Richard Huxton <dev(at)archonet(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 10:16:16
Message-ID: 47D65BF0.2020507@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Richard Huxton wrote:
> Tatsuo Ishii wrote:
>> Hi,
>>
>> I have encountered a strange pg_ctl's behavior in 8.3.
>>
>> pg_ctl -w -o "-p 5432" start <-- works
>> pg_ctl -w -o "-i" start <-- works
>> pg_ctl -w -o "-p 5432 -i" start <-- doesn't work
>>
>> In the last case, even postmaster starts successfully, pg_ctl keeps
>> trying to make sure that postmaster actually started and continues to
>> print "...".
>
> It's not getting confused and thinking the port is "5432 -i" is it? I
> tried "-i -p 5432" and that seemed to work.

Hmm - that does seem to be the case. I added a line to print "connstr"
along with the "."
waiting for server to start....dbname=postgres port=5483 -i
connect_timeout=5.

The code looks fine to my uneducated eye though (bin/pg_ctl/pg_ctl.c
test_postmaster_connection starting at line 412. I think the issue must
be at lines 425..443)

--
Richard Huxton
Archonet Ltd


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: dev(at)archonet(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 10:23:08
Message-ID: 20080311.192308.25151463.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Tatsuo Ishii wrote:
> > Hi,
> >
> > I have encountered a strange pg_ctl's behavior in 8.3.
> >
> > pg_ctl -w -o "-p 5432" start <-- works
> > pg_ctl -w -o "-i" start <-- works
> > pg_ctl -w -o "-p 5432 -i" start <-- doesn't work
> >
> > In the last case, even postmaster starts successfully, pg_ctl keeps
> > trying to make sure that postmaster actually started and continues to
> > print "...".
>
> It's not getting confused and thinking the port is "5432 -i" is it? I
> tried "-i -p 5432" and that seemed to work.

Thanks for the hint. I confirmed that:

pg_ctl -w -o "-p 5432 '-i'"

also worked.

If my memory is correct, pg_ctl -w -o "-p 5432 -i" worked fine on 8.2
or 8.1 or before.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


From: Richard Huxton <dev(at)archonet(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 10:46:17
Message-ID: 47D662F9.2070304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Richard Huxton wrote:
>
> Hmm - that does seem to be the case. I added a line to print "connstr"
> along with the "."
> waiting for server to start....dbname=postgres port=5483 -i
> connect_timeout=5.
>
> The code looks fine to my uneducated eye though (bin/pg_ctl/pg_ctl.c
> test_postmaster_connection starting at line 412. I think the issue must
> be at lines 425..443)

Line 52:
#define WHITESPACE "\f\n\r\t\v" /* as defined by isspace() */

We've defined whitespace as not including a space character :-/

--
Richard Huxton
Archonet Ltd


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 13:00:36
Message-ID: 200803111300.m2BD0aS18752@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Richard Huxton wrote:
> Richard Huxton wrote:
> >
> > Hmm - that does seem to be the case. I added a line to print "connstr"
> > along with the "."
> > waiting for server to start....dbname=postgres port=5483 -i
> > connect_timeout=5.
> >
> > The code looks fine to my uneducated eye though (bin/pg_ctl/pg_ctl.c
> > test_postmaster_connection starting at line 412. I think the issue must
> > be at lines 425..443)
>
> Line 52:
> #define WHITESPACE "\f\n\r\t\v" /* as defined by isspace() */
>
> We've defined whitespace as not including a space character :-/

Yes, we fixed this on February 20 and the fix will appear in 8.3.1 and
all back brances once a release is made.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: bruce(at)momjian(dot)us
Cc: dev(at)archonet(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange pg_ctl's behavior
Date: 2008-03-11 13:27:49
Message-ID: 20080311.222749.58446870.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> > Line 52:
> > #define WHITESPACE "\f\n\r\t\v" /* as defined by isspace() */
> >
> > We've defined whitespace as not including a space character :-/
>
> Yes, we fixed this on February 20 and the fix will appear in 8.3.1 and
> all back brances once a release is made.

Thanks. I should have checked the CVS tips.
--
Tatsuo Ishii
SRA OSS, Inc. Japan