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

Re: Win32 question: getppid() with no parent?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "PgSql-Win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Win32 question: getppid() with no parent?
Date: 2004-05-29 22:58:03
Message-ID: 10201.1085871483@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>> But you'd do that only once during postmaster start, right?  It's
>> probably marginally faster/safer to do that than to fabricate a new
>> handle in each child based on PostmasterPid.

> Yup, then you could just write the HANDLE vlaue (basically a 32-bit
> integer) to the backend startup file

Great.  Could I get someone to implement this now?  The function that
needs it is PostmasterIsAlive() in src/backend/storage/ipc/pmsignal.c.
You can check whether it works by noting whether the stats processes
shut down when the postmaster goes away ...

> If you need the pgstat process to keep track of it's chlid (the other
> pgstat process), you'd need it once there too.

The pgstat processes (and everything else launched by the postmaster)
now use write/read_backend_variables, so copying the handle there should
be sufficient.

			regards, tom lane

In response to

pgsql-hackers-win32 by date

Next:From: Claudio NatoliDate: 2004-05-30 02:17:44
Subject: Re: Win32 question: getppid() with no paren
Previous:From: Harald Armin MassaDate: 2004-05-29 17:09:55
Subject: Re: Loggin on WIN32

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