Re: pg_ctl reports succes when start fails

Lists: pgsql-hackerspgsql-hackers-win32
From: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_ctl reports succes when start fails
Date: 2003-10-23 08:29:15
Message-ID: 200310231029.15590.t.maekitalo@epgmbh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Hi,

I installed 7.4beta5, created a data-dir and tried to start postgresql with
pg_ctl without initdb. As expected, this will fail. But pg_ctl tells me
"postmaster successfully started", after a fatal error, which looks very
confusing. When I use -l for specifying a logfile, I don't even see the
error, but only the success-message.

Tommi

--
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 13:39:30
Message-ID: 29225.1066916370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de> writes:
> I installed 7.4beta5, created a data-dir and tried to start postgresql with
> pg_ctl without initdb. As expected, this will fail. But pg_ctl tells me
> "postmaster successfully started", after a fatal error, which looks very
> confusing. When I use -l for specifying a logfile, I don't even see the
> error, but only the success-message.

If you don't use -w, then pg_ctl doesn't wait around to see whether the
postmaster started or not. It'd probably be a good idea for it to issue
a less positive message in this case, maybe only "postmaster launched".

I also wonder why -w isn't the default.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 14:36:02
Message-ID: 3F97E752.5000500@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Tom Lane wrote:

>Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de> writes:
>
>
>>I installed 7.4beta5, created a data-dir and tried to start postgresql with
>>pg_ctl without initdb. As expected, this will fail. But pg_ctl tells me
>>"postmaster successfully started", after a fatal error, which looks very
>>confusing. When I use -l for specifying a logfile, I don't even see the
>>error, but only the success-message.
>>
>>
>
>If you don't use -w, then pg_ctl doesn't wait around to see whether the
>postmaster started or not. It'd probably be a good idea for it to issue
>a less positive message in this case, maybe only "postmaster launched".
>
>I also wonder why -w isn't the default.
>
>
>
It is for stop but not for start/restart, which does seem a bit odd.

On a slightly related note, I see that this is still a shell script, as
are initlocation, ipcclean and pg_config. I assume these will have to be
rewritten in C for the Win32 port?

cheers

andrew


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 14:36:35
Message-ID: 3F97E773.9020908@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> If you don't use -w, then pg_ctl doesn't wait around to see whether the
> postmaster started or not. It'd probably be a good idea for it to issue
> a less positive message in this case, maybe only "postmaster launched".
>
> I also wonder why -w isn't the default.

I've also noticed that on our production 7.3.4 server logging to syslog,
that if I change the postgresql.conf to enable log_statement, and then
do pg_ctl reload, it works, but then when I disable it again, pg_ctl
reload does not cause postgres to pick up the changes.

I haven't done too much investigation here in to the exact problem, but
there is something odd going on...

Chris


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 14:48:17
Message-ID: 29828.1066920497@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> I've also noticed that on our production 7.3.4 server logging to syslog,
> that if I change the postgresql.conf to enable log_statement, and then
> do pg_ctl reload, it works, but then when I disable it again, pg_ctl
> reload does not cause postgres to pick up the changes.

By "disable" do you mean "turn off", or "comment out again"? The latter
is not going to affect the state of the postmaster ...

regards, tom lane


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 15:04:07
Message-ID: 3F97EDE7.3050208@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> By "disable" do you mean "turn off", or "comment out again"? The latter
> is not going to affect the state of the postmaster ...

The latter...why won't it affect the postmaster state?

Chris


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 15:08:11
Message-ID: 186.1066921691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> By "disable" do you mean "turn off", or "comment out again"? The latter
>> is not going to affect the state of the postmaster ...

> The latter...why won't it affect the postmaster state?

Because it's a *comment*.

regards, tom lane


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 15:28:04
Message-ID: 3F97F384.4070007@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32


>>The latter...why won't it affect the postmaster state?
>
>
> Because it's a *comment*.

Shouldn't it revert to the default value?

Chris


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 16:44:56
Message-ID: 200310231644.h9NGiuP25950@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Andrew Dunstan wrote:
> Tom Lane wrote:
>
> >Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de> writes:
> >
> >
> >>I installed 7.4beta5, created a data-dir and tried to start postgresql with
> >>pg_ctl without initdb. As expected, this will fail. But pg_ctl tells me
> >>"postmaster successfully started", after a fatal error, which looks very
> >>confusing. When I use -l for specifying a logfile, I don't even see the
> >>error, but only the success-message.
> >>
> >>
> >
> >If you don't use -w, then pg_ctl doesn't wait around to see whether the
> >postmaster started or not. It'd probably be a good idea for it to issue
> >a less positive message in this case, maybe only "postmaster launched".
> >
> >I also wonder why -w isn't the default.
> >
> >
> >
> It is for stop but not for start/restart, which does seem a bit odd.
>
> On a slightly related note, I see that this is still a shell script, as
> are initlocation, ipcclean and pg_config. I assume these will have to be
> rewritten in C for the Win32 port?

OK, I updated the Win32 web page to mention we need a C version of
pg_ctl. I don't think we will need pg_config once we have initdb in C,
and I don't think it is worth doing initlocation because we need
tablespaces.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-23 16:51:10
Message-ID: 200310231651.h9NGpAR26616@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Tom Lane wrote:
> Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de> writes:
> > I installed 7.4beta5, created a data-dir and tried to start postgresql with
> > pg_ctl without initdb. As expected, this will fail. But pg_ctl tells me
> > "postmaster successfully started", after a fatal error, which looks very
> > confusing. When I use -l for specifying a logfile, I don't even see the
> > error, but only the success-message.
>
> If you don't use -w, then pg_ctl doesn't wait around to see whether the
> postmaster started or not. It'd probably be a good idea for it to issue
> a less positive message in this case, maybe only "postmaster launched".
>
> I also wonder why -w isn't the default.

The following patch changes the message from "started" to "starting" for
non-"-w" starts. I will keep it for 7.5.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 733 bytes

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] pg_ctl reports succes when start fails
Date: 2003-10-23 17:58:09
Message-ID: 3F9816B1.60807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Bruce Momjian wrote:

>OK, I updated the Win32 web page to mention we need a C version of
>pg_ctl. I don't think we will need pg_config once we have initdb in C,
>and I don't think it is worth doing initlocation because we need
>tablespaces.
>

I will put it on my todo list (should be simpler than initdb ;-) ).
I'll start with a Unix version since I haven't seen the shape of the
signalling we are using on Win32 yet.

cheers

andrew


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-24 12:35:12
Message-ID: Pine.LNX.4.44.0310241434230.17076-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Tom Lane writes:

> I also wonder why -w isn't the default.

Because it is not sufficiently reliable in start mode. See
source code and archives.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-24 14:18:45
Message-ID: 3F9934C5.2020104@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Peter Eisentraut wrote:

>Tom Lane writes:
>
>
>
>>I also wonder why -w isn't the default.
>>
>>
>
>Because it is not sufficiently reliable in start mode. See
>source code and archives.
>
>
>

I think we can improve -w, though. Here's what the code says about the
section where it tries to use psql to determine that the postmaster is
up and running:

# FIXME: This is horribly misconceived.
# 1) If password authentication is set up, the connection will fail.
# 2) If a virtual host is set up, the connection may fail.
# 3) If network traffic filters are set up tight enough, the connection
# may fail.
# 4) When no Unix domain sockets are available, the connection will
# fail. (Using TCP/IP by default ain't better.)
# 5) If the dynamic loader is not set up correctly (for this user/at
# this time), psql will fail (to find libpq).
# 6) If psql is misconfigured, this may fail.

we could provide a password option to handle 1, and in C we can make the
connection ourselves using libpq instead of relying on psql to do it for
us, which should account for 5 and 6, I think.

For the cases of 2, 3 and 4 we can either try to detect it from the
configuration settings, or suggest that users will need to use -W for
such cases. To me it would be strange to have a setup where no
connection from the machine where pg is running is possible, but maybe
people do such odd things.

We can also try to come up with a better scheme for verifying that we
have started properly - I will think about that.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Defaults for GUC variables (was Re: pg_ctl reports succes when start fails)
Date: 2003-10-27 15:22:32
Message-ID: 29413.1067268152@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>>> The latter...why won't it affect the postmaster state?
>>
>> Because it's a *comment*.

> Shouldn't it revert to the default value?

No, not unless you think the postmaster should react to comments in the
postgresql.conf file, which is rather against my idea of a comment.

However, you're not the first to get burnt by this mis-assumption,
so maybe we should do something about it.

The low-tech solution to this would be to stop listing the default
values as commented-out entries, but just make them ordinary uncommented
entries. That way people who think "undoing my edit will revert the
change" would be right.

Or we could try to make it actually work the way you seem to be
expecting. The only implementation I can think of is to reset GUC
variables to defaults just before scanning the .conf file (but only
if their prior value came from the .conf file, which fortunately is
something we keep track of). The trouble with this is that any error
in scanning the .conf file could leave you with unexpectedly reverted
values for later entries, because they'd not be reached.

Or we could just document the behavior better...

regards, tom lane


From: Michael Brusser <michael(at)synchronicity(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Defaults for GUC variables (was Re: pg_ctl reports
Date: 2003-10-27 16:03:26
Message-ID: DEEIJKLFNJGBEMBLBAHCKEIJDNAA.michael@synchronicity.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > Shouldn't it revert to the default value?
>
> No, not unless you think the postmaster should react to comments in the
> postgresql.conf file, which is rather against my idea of a comment.
>
> However, you're not the first to get burnt by this mis-assumption,
> so maybe we should do something about it.
>
> The low-tech solution to this would be to stop listing the default
> values as commented-out entries, but just make them ordinary uncommented
> entries. That way people who think "undoing my edit will revert the
> change" would be right.
>
> Or we could try to make it actually work the way you seem to be
> expecting. The only implementation I can think of is to reset GUC
> variables to defaults just before scanning the .conf file ...
------

I have to say we never had any problems or misconception with
how it currently works, but if this has to be changed I'd rather
vote for the low-tech solution.

Mike.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-27 16:44:02
Message-ID: 29994.1067273042@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> We can also try to come up with a better scheme for verifying that we
> have started properly - I will think about that.

There have been previous suggestions for a "pg_ping" functionality, in
which you could simply send a packet to the postmaster and it would
answer back if it's open for business. You can approximate this by
sending a deliberately invalid login packet, but it's not quite the same
thing. I think there were some concerns about security though; check
the archives.

In any case, a C-code pg_ctl could eliminate most of the problems
directly, simply because it wouldn't have to rely on psql.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-27 19:03:39
Message-ID: 3F9D6C0B.8060700@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>We can also try to come up with a better scheme for verifying that we
>>have started properly - I will think about that.
>>
>>
>
>There have been previous suggestions for a "pg_ping" functionality, in
>which you could simply send a packet to the postmaster and it would
>answer back if it's open for business. You can approximate this by
>sending a deliberately invalid login packet, but it's not quite the same
>thing. I think there were some concerns about security though; check
>the archives.
>
>In any case, a C-code pg_ctl could eliminate most of the problems
>directly, simply because it wouldn't have to rely on psql.
>
>
>
Right. The remaining cases would be fairly much those where the
configuration is such that a connection is not possible. My feeling is
that if people tie themselves down that tightly then they should also
specify "no wait" with pg_ctl - it depends on how much we want to keep
backwards compatibility with this behaviour.

cheers

andrew


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Defaults for GUC variables (was Re: pg_ctl reports
Date: 2003-10-28 01:24:53
Message-ID: 3F9DC565.6070400@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> However, you're not the first to get burnt by this mis-assumption,
> so maybe we should do something about it.
>
> The low-tech solution to this would be to stop listing the default
> values as commented-out entries, but just make them ordinary uncommented
> entries. That way people who think "undoing my edit will revert the
> change" would be right.

I would be in favour of that way of doing things. I have always found
it weird that defaults were commented out...

Chris


From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Defaults for GUC variables (was Re: pg_ctl reports succes when start fails)
Date: 2003-10-28 11:38:53
Message-ID: g1lspvc2r8fivlmikeep23gegmp64q1e6o@email.aon.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

On Mon, 27 Oct 2003 10:22:32 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:
>The low-tech solution to this would be to stop listing the default
>values as commented-out entries, but just make them ordinary uncommented
>entries.

Please not. How should we ask a newbie seeking assistance on one of
the support lists to show his non-default config settings?

Servus
Manfred


From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-29 00:59:45
Message-ID: 20031029005945.GA87754@perrin.nxad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> > We can also try to come up with a better scheme for verifying that
> > we have started properly - I will think about that.
>
> There have been previous suggestions for a "pg_ping" functionality,
> in which you could simply send a packet to the postmaster and it
> would answer back if it's open for business. You can approximate
> this by sending a deliberately invalid login packet, but it's not
> quite the same thing. I think there were some concerns about
> security though; check the archives.

Um, I wrote pg_ping and sent it to -patches but got no comments.

http://archives.postgresql.org/pgsql-patches/2003-07/msg00053.php

pg_ping is actually the basis for the threaded benchmark program I've
got sitting in my tree, but I don't think folks here would look kindly
on a -lpthread dependency given how up in the air pg's thread
support/testing is at the moment. -sc

--
Sean Chittenden


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-29 03:36:00
Message-ID: 200310290336.h9T3a0720922@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

Sean Chittenden wrote:
> > > We can also try to come up with a better scheme for verifying that
> > > we have started properly - I will think about that.
> >
> > There have been previous suggestions for a "pg_ping" functionality,
> > in which you could simply send a packet to the postmaster and it
> > would answer back if it's open for business. You can approximate
> > this by sending a deliberately invalid login packet, but it's not
> > quite the same thing. I think there were some concerns about
> > security though; check the archives.
>
> Um, I wrote pg_ping and sent it to -patches but got no comments.
>
> http://archives.postgresql.org/pgsql-patches/2003-07/msg00053.php
>
> pg_ping is actually the basis for the threaded benchmark program I've
> got sitting in my tree, but I don't think folks here would look kindly
> on a -lpthread dependency given how up in the air pg's thread
> support/testing is at the moment. -sc

As far as I know, thread support is on the ground for platforms that
have tested it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl reports succes when start fails
Date: 2003-10-29 04:17:11
Message-ID: 002b01c39dd3$86dd3490$6401a8c0@DUNSLANE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32


----- Original Message -----
From: "Sean Chittenden" <sean(at)chittenden(dot)org>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>; <pgsql-hackers(at)postgresql(dot)org>
Sent: Tuesday, October 28, 2003 7:59 PM
Subject: Re: [HACKERS] pg_ctl reports succes when start fails

> > > We can also try to come up with a better scheme for verifying that
> > > we have started properly - I will think about that.
> >
> > There have been previous suggestions for a "pg_ping" functionality,
> > in which you could simply send a packet to the postmaster and it
> > would answer back if it's open for business. You can approximate
> > this by sending a deliberately invalid login packet, but it's not
> > quite the same thing. I think there were some concerns about
> > security though; check the archives.
>
> Um, I wrote pg_ping and sent it to -patches but got no comments.
>
> http://archives.postgresql.org/pgsql-patches/2003-07/msg00053.php
>
> pg_ping is actually the basis for the threaded benchmark program I've
> got sitting in my tree, but I don't think folks here would look kindly
> on a -lpthread dependency given how up in the air pg's thread
> support/testing is at the moment. -sc
>

At least those parts of that patch that alter pg_ctl seem to be moot given
that we are moving to a C version of pg_ctl (Joshua Drake tells me that
CommandPrompt is willing to do that work).

cheers

andrew