pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laszlo Nagy <gandalf@shopzeus.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: rebellious pg stats collector (reopened case)
Date: Mon, 29 Dec 2008 10:26:33 -0500
Message-ID: <7721.1230564393@sss.pgh.pa.us> (raw)
In-Reply-To: <4958851B.8060500@shopzeus.com>
References: <49479876.8040607@shopzeus.com>
	<20081216134542.GH4741@alvh.no-ip.org>
	<494B614C.5060808@shopzeus.com>
	<20081219130446.GC4278@alvh.no-ip.org>
	<494F67D2.3090406@shopzeus.com>
	<6938.1229952228@sss.pgh.pa.us>
	<20081222132721.GC10220@alvh.no-ip.org>
	<7117.1229952970@sss.pgh.pa.us>
	<4958851B.8060500@shopzeus.com>

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



view thread (16+ messages)  latest in thread

Message-ID: <7721.1230564393@sss.pgh.pa.us>
Permalink:  ../7721.1230564393@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7721.1230564393@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gandalf@shopzeus.com, pgsql-admin@postgresql.org
  Subject: Re: rebellious pg stats collector (reopened case)
  In-Reply-To: <7721.1230564393@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox