"Kevin Grittner" <kevin.gritt...@wicourts.gov> writes: > Peter Eisentraut <pete...@gmx.net> wrote: >> Why not just compare pg_backend_pid() with postmaster.pid? > See the prior discussion in the archives. We started with that and > found problems, to which Tom suggested a random number as the best > solution.
I think Peter's idea is a bit different though. The previous concern was about what information would be okay to expose in a pg_ping response packet, which presumably would be available to anybody who could open a connection to the postmaster port. What he's suggesting is to crosscheck against data that is available after a successful login. That eliminates the security complaint. It strikes me we could do something without adding a postmaster-PID SQL function, too. What about doing SHOW DATA_DIRECTORY and comparing that to what pg_regress expects? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers