Re: Cluster Up-time. - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Cluster Up-time.
Date
Msg-id 20080818125556.GA97054@winnie.fuhr.org
Whole thread Raw
In response to Cluster Up-time.  (Alexi Gen <alexigen@yahoo.com>)
List pgsql-general
On Mon, Aug 18, 2008 at 03:53:32AM -0700, Alexi Gen wrote:
> Is there a table/view available from where I can check what time the cluster was started?
> Need this to calculate the uptime of the cluster.

In PostgreSQL 8.1 and later you can run these queries to get the start
time and uptime:

SELECT pg_postmaster_start_time();
SELECT now() - pg_postmaster_start_time();

--
Michael Fuhr

pgsql-general by date:

Previous
From: Reid Thompson
Date:
Subject: Re: Regression failing on build -> ERROR: could not access file "$libdir/plpgsql": No such file or directory
Next
From: justin
Date:
Subject: Re: What's size of your PostgreSQL Database?