Re: rebellious pg stats collector (reopened case) - Mailing list pgsql-admin

From Tom Lane
Subject Re: rebellious pg stats collector (reopened case)
Date
Msg-id 7721.1230564393@sss.pgh.pa.us
Whole thread Raw
In response to Re: rebellious pg stats collector (reopened case)  (Laszlo Nagy <gandalf@shopzeus.com>)
Responses Re: rebellious pg stats collector (reopened case)
List pgsql-admin
Laszlo Nagy <gandalf@shopzeus.com> writes:
> maybe is it possible to change the source code, and disable the "is
> postmaster alive" check for testing?

Rather than disabling it, it'd probably be more convenient to make
any getppid value except 1 (the init process) be treated as "it's
alive".  Otherwise you'll have trouble with the collector not stopping
when you want it to.  Look into src/backend/storage/ipc/pmsignal.c:

-        return (getppid() == PostmasterPid);
+        return (getppid() != 1);

(Obviously this is a hack, but it should work on any Unixish system)

            regards, tom lane

pgsql-admin by date:

Previous
From: Laszlo Nagy
Date:
Subject: Re: rebellious pg stats collector (reopened case)
Next
From: Carol Walter
Date:
Subject: ssl database connection problems...