Skip site navigation (1) Skip section navigation (2)

Re: We should Axe /contrib/start-scripts

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chander Ganesan <chander(at)otg-nc(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: We should Axe /contrib/start-scripts
Date: 2009-08-25 20:16:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Chander Ganesan wrote:
> Alvaro Herrera wrote:

> >This is something we're not quite ready on, yet.  We need some mechanism
> >that allows scripts to verify not only that postmaster started, but also
> >that it has finished recovery.  You can sort-of do it by attempting a
> >connection and checking the error message, but it's ugly.  There was
> >talk about a pg_ping utility years ago, but nobody got around to writing
> >it ...
> Can't you use pg_controldata to see whether it is in recovery or
> not?  Seems like you've got a way to see if it's running, seeing if
> it is in recovery should therefore be pretty straightforward, no?

That's within my definition of "ugly", yes :-)  My ideal tool would do
something like

$ pg_ping -h foo -p 5555
$ echo $?

$ # sleep a bit ...

$ pg_ping -h foo -p 5555
$ echo $?

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

In response to


pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2009-08-25 20:27:22
Subject: Re: We should Axe /contrib/start-scripts
Previous:From: Kevin GrittnerDate: 2009-08-25 20:13:24
Subject: Re: We should Axe /contrib/start-scripts

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group