Database Reference
In-Depth Information
Version
Last supported date
PostgreSQL 8.2
December 2011
PostgreSQL 8.3
February 2013
PostgreSQL 8.4
July 2014
PostgreSQL 9.0
Aug 2015 (approximately)
There's more...
Some other ways of checking the version number are as follows:
bash # psql --version
psql (PostgreSQL) 9.0
However, be wary that this shows the client software version number that might differ from
the server software version number. You check the server version directly using the following:
bash # cat $PGDATADIRECTORY/PG_VERSION
Although neither of these show the maintenance release number.
Why is the database version important?
PostgreSQL has internal version numbers for the data file format, the
database catalog layout, and the crash recovery format. Each of these
is checked as the server runs, to ensure that the data isn't corrupted.
PostgreSQL doesn't change these internal formats for a single release, they
only change across releases.
From a user perspective, each release differs in terms of the way the server
behaves. If you know your application well, then it should be possible to
assess the differences just by reading the release notes for each version. In
many cases, a retest of the application is the safest thing to do.
What is the server uptime?
Or: How long is it since the server started?
How to do it...
Issue the following SQL from any interface:
postgres=# SELECT date_trunc('second',
current_timestamp - pg_postmaster_start_time()) as uptime;
uptime
──────────
00:38:15
Search WWH ::




Custom Search