Re: TODO item for pg_ctl and server detection

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: 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-29 18:44:27
Message-ID: 201012291844.oBTIiRe14875@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 postmaster.pid 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 postmaster.pid 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.

Updated patch attached.

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

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

Attachment Content-Type Size
/pgpatches/pg_ctl.diff text/x-diff 16.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-12-29 18:47:37 Re: SSI memory mitigation & false positive degradation
Previous Message Robert Haas 2010-12-29 18:42:04 Re: pg_streamrecv for 9.1?