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

Re: rebellious pg stats collector (reopened case)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laszlo Nagy <gandalf(at)shopzeus(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: rebellious pg stats collector (reopened case)
Date: 2008-12-29 15:26:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-adminpgsql-performance
Laszlo Nagy <gandalf(at)shopzeus(dot)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

In response to


pgsql-performance by date

Next:From: Laszlo NagyDate: 2008-12-30 09:05:59
Subject: Big index sizes
Previous:From: Laszlo NagyDate: 2008-12-29 13:11:48
Subject: Re: Slow table update - SOLVED!

pgsql-admin by date

Next:From: Carol WalterDate: 2008-12-29 21:23:30
Subject: ssl database connection problems...
Previous:From: Laszlo NagyDate: 2008-12-29 08:06:51
Subject: Re: rebellious pg stats collector (reopened case)

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