pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: What Are Last Steps Performed When PostgreSQL Starts?
6+ messages / 5 participants
[nested] [flat]

* What Are Last Steps Performed When PostgreSQL Starts?
@ 2006-09-27 14:05 Lane Van Ingen <lvaningen@esncc.com>
  2006-09-27 13:56 ` Re: What Are Last Steps Performed When PostgreSQL Starts? Ray Stell <stellr@cns.vt.edu>
  2006-09-27 14:15 ` Re: What Are Last Steps Performed When PostgreSQL Starts? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Lane Van Ingen @ 2006-09-27 14:05 UTC (permalink / raw)
  To: pgsql-admin

We are running PostgreSQL 8.1.4 on Red Hat Enterprise Linux 4.0 platforms
that are deployed worldwide.

In our most recent release, we started using a Java tool called IZPack to
install and start up our application, including PostgreSQL. We are finding
that we need to slow down this Java tool as it installs our application,
since it appears the tool does not wait for each step in the install script
to complete before executing the next step. This is affecting a successful
install of PostgreSQL.

QUESTION: what are the few last steps that PostgreSQL does when it starts
up? I am looking for things that I can check to be sure it has completed
installation (from a script) before allowing the script to proceed to the
next step, like:
  - opening a socket
  - creating a PID file
  - etc.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: What Are Last Steps Performed When PostgreSQL Starts?
  2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
@ 2006-09-27 13:56 ` Ray Stell <stellr@cns.vt.edu>
  1 sibling, 0 replies; 6+ messages in thread

From: Ray Stell @ 2006-09-27 13:56 UTC (permalink / raw)
  To: Lane Van Ingen <lvaningen@esncc.com>; +Cc: pgsql-admin


actually, wouldn't it be interesting to see a description of all the 
things that go on from start to finish, in general or course.  It helps
to know the logic behind the scenes when things break; not if, when.



On Wed, Sep 27, 2006 at 10:05:24AM -0400, Lane Van Ingen wrote:
> QUESTION: what are the few last steps that PostgreSQL does when it starts
> up? I am looking for things that I can check to be sure it has completed
> installation (from a script) before allowing the script to proceed to the
> next step, like:
>   - opening a socket
>   - creating a PID file
>   - etc.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: What Are Last Steps Performed When PostgreSQL Starts?
  2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
@ 2006-09-27 14:15 ` Tom Lane <tgl@sss.pgh.pa.us>
  2006-09-27 16:54   ` Re: What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2006-09-27 14:15 UTC (permalink / raw)
  To: Lane Van Ingen <lvaningen@esncc.com>; +Cc: pgsql-admin

"Lane Van Ingen" <lvaningen@esncc.com> writes:
> QUESTION: what are the few last steps that PostgreSQL does when it starts
> up? I am looking for things that I can check to be sure it has completed
> installation (from a script) before allowing the script to proceed to the
> next step, like:

I'm confused about whether you are talking about installation or server
startup.  If installation, shouldn't your script just be waiting for the
subprocess to exit?  As for server startup, the best procedure is the
one pg_ctl uses: try to make a connection, if fail, sleep a second or so
and try again.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: What Are Last Steps Performed When PostgreSQL Starts?
  2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
  2006-09-27 14:15 ` Re: What Are Last Steps Performed When PostgreSQL Starts? Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-09-27 16:54   ` Lane Van Ingen <lvaningen@esncc.com>
  2006-09-28 16:32     ` Re: What Are Last Steps Performed When PostgreSQL Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Lane Van Ingen @ 2006-09-27 16:54 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin; stellr@cns.vt.edu

Forgot about 'pg_ctl status'. That will work fine for my needs.

Ray Stell mentioned it would be helpful to see a description of all the 
things that go on from start to finish, in general or course. I agree. It
helps to know the logic going on behind the scenes when things break. I had
a problem in August where PostgreSQL would not come up; I finally traced it
to broken links in the libraries, but it took a long time to find .... and
there were no error messages logged to help. Does this kind of information
exist anywhere?

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Wednesday, September 27, 2006 10:16 AM
To: Lane Van Ingen
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] What Are Last Steps Performed When PostgreSQL Starts? 

"Lane Van Ingen" <lvaningen@esncc.com> writes:
> QUESTION: what are the few last steps that PostgreSQL does when it starts
> up? I am looking for things that I can check to be sure it has completed
> installation (from a script) before allowing the script to proceed to the
> next step, like:

I'm confused about whether you are talking about installation or server
startup.  If installation, shouldn't your script just be waiting for the
subprocess to exit?  As for server startup, the best procedure is the
one pg_ctl uses: try to make a connection, if fail, sleep a second or so
and try again.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: What Are Last Steps Performed When PostgreSQL
  2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
  2006-09-27 14:15 ` Re: What Are Last Steps Performed When PostgreSQL Starts? Tom Lane <tgl@sss.pgh.pa.us>
  2006-09-27 16:54   ` Re: What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
@ 2006-09-28 16:32     ` Bruce Momjian <bruce@momjian.us>
  2006-09-28 19:18       ` Re: What Are Last Steps Performed When PostgreSQL Brad Nicholson <bnichols@ca.afilias.info>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2006-09-28 16:32 UTC (permalink / raw)
  To: Lane Van Ingen <lvaningen@esncc.com>; +Cc: 'Tom Lane' <tgl@sss.pgh.pa.us>; pgsql-admin; stellr@cns.vt.edu

Lane Van Ingen wrote:
> Forgot about 'pg_ctl status'. That will work fine for my needs.
> 
> Ray Stell mentioned it would be helpful to see a description of all the 
> things that go on from start to finish, in general or course. I agree. It
> helps to know the logic going on behind the scenes when things break. I had
> a problem in August where PostgreSQL would not come up; I finally traced it
> to broken links in the libraries, but it took a long time to find .... and
> there were no error messages logged to help. Does this kind of information
> exist anywhere?

The information exists only in the source code.

-- 
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: What Are Last Steps Performed When PostgreSQL
  2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
  2006-09-27 14:15 ` Re: What Are Last Steps Performed When PostgreSQL Starts? Tom Lane <tgl@sss.pgh.pa.us>
  2006-09-27 16:54   ` Re: What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
  2006-09-28 16:32     ` Re: What Are Last Steps Performed When PostgreSQL Bruce Momjian <bruce@momjian.us>
@ 2006-09-28 19:18       ` Brad Nicholson <bnichols@ca.afilias.info>
  0 siblings, 0 replies; 6+ messages in thread

From: Brad Nicholson @ 2006-09-28 19:18 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Lane Van Ingen <lvaningen@esncc.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin; stellr@cns.vt.edu

On Thu, 2006-09-28 at 12:32 -0400, Bruce Momjian wrote:
> Lane Van Ingen wrote:
> > Forgot about 'pg_ctl status'. That will work fine for my needs.
> > 
> > Ray Stell mentioned it would be helpful to see a description of all the 
> > things that go on from start to finish, in general or course. I agree. It
> > helps to know the logic going on behind the scenes when things break. I had
> > a problem in August where PostgreSQL would not come up; I finally traced it
> > to broken links in the libraries, but it took a long time to find .... and
> > there were no error messages logged to help. Does this kind of information
> > exist anywhere?
> 
> The information exists only in the source code.

I could see the merit of having that info in the docs.

Brad.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-09-28 19:18 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-27 14:05 What Are Last Steps Performed When PostgreSQL Starts? Lane Van Ingen <lvaningen@esncc.com>
2006-09-27 13:56 ` Ray Stell <stellr@cns.vt.edu>
2006-09-27 14:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-09-27 16:54   ` Lane Van Ingen <lvaningen@esncc.com>
2006-09-28 16:32     ` Re: What Are Last Steps Performed When PostgreSQL Bruce Momjian <bruce@momjian.us>
2006-09-28 19:18       ` Re: What Are Last Steps Performed When PostgreSQL Brad Nicholson <bnichols@ca.afilias.info>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox