Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 789B564FD8E for ; Mon, 29 Dec 2008 11:26:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75562-01 for ; Mon, 29 Dec 2008 11:26:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4BF4564FD20 for ; Mon, 29 Dec 2008 11:26:35 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBTFQX6H007722; Mon, 29 Dec 2008 10:26:33 -0500 (EST) To: Laszlo Nagy cc: pgsql-admin@postgresql.org Subject: Re: rebellious pg stats collector (reopened case) 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> Comments: In-reply-to Laszlo Nagy message dated "Mon, 29 Dec 2008 09:06:51 +0100" Date: Mon, 29 Dec 2008 10:26:33 -0500 Message-ID: <7721.1230564393@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/192 X-Sequence-Number: 31025 Laszlo Nagy 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