X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 362495641B for ; Fri, 25 Feb 2005 01:38:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65262-06 for ; Fri, 25 Feb 2005 01:38:38 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C6C7B56405 for ; Fri, 25 Feb 2005 01:38:36 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1P1co2X029376; Thu, 24 Feb 2005 20:38:50 -0500 (EST) To: escpg@eonomine.com Cc: pgsql-patches@postgresql.org Subject: Re: Patch for Postmaster Uptime (from the TODO) In-reply-to: <39796.207.171.180.101.1109285340.spork@webmail.eonomine.com> References: <39796.207.171.180.101.1109285340.spork@webmail.eonomine.com> Comments: In-reply-to "Eric Crampton" message dated "Thu, 24 Feb 2005 14:49:00 -0800" Date: Thu, 24 Feb 2005 20:38:50 -0500 Message-ID: <29374.1109295530@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/189 X-Sequence-Number: 14759 "Eric Crampton" writes: > I noticed in the TODO that there is an item requesting a function which > returns the uptime of the postmaster. I've wanted that as well. So, I've > added just such a thing: server_start_time(). This function returns the > time when the postmaster was started; a simple now() - server_start_time() > returns the uptime. Isn't there one of these in the patch queue already? The patch as given won't work on Windows, because it depends on fork inheritance of the value. I think the previous patcher fixed that. regards, tom lane