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

Re: TODO item for pg_ctl and server detection

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO item for pg_ctl and server detection
Date: 2010-12-31 22:26:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian wrote:
> Bruce Momjian wrote:
> > Yes, that was my calculus too.  I realized that we create session ids by
> > merging the process id and backend start time, so I went ahead and added
> > the postmaster start time epoch to the file.  While there
> > is no way to pass back the postmaster start time from PQping, I added
> > code to pg_ctl to make sure the time in the file is not
> > _before_ pg_ctl started running.  We only check PQping() after we have
> > started the postmaster ourselves, so it fits our needs.
> Tom suggested that there might be clock skew between pg_ctl and the
> postmaster, so I added a 2-second slop in checking the postmaster start
> time.  Tom also wanted the connection information to be output all at
> once, but that causes a problem with detecting pre-9.1 servers so I
> avoided it.

Patch applied, and TODO item removed because patch mostly detects if a
stale postmaster created the file.  The TODO was:

	Allow pg_ctl to work properly with configuration files located outside
	the PGDATA directory)

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + It's impossible for everything to be true. +

In response to


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-01-01 00:00:03
Subject: Re: pl/python refactoring
Previous:From: Hannu KrosingDate: 2010-12-31 21:18:15
Subject: Re: Sync Rep Design

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