pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: S. Bob <sbob@quadratum-braccas.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Unique cluster / instance identifier?
Date: Mon, 18 Feb 2019 13:40:02 -0500
Message-ID: <da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com> (raw)
In-Reply-To: <87r2c5htm3.fsf@news-spur.riddles.org.uk>
References: <92d53982-cf1d-ce3f-c541-60a252f85aef@quadratum-braccas.com>
	<87r2c5htm3.fsf@news-spur.riddles.org.uk>

On 2/18/19 1:03 PM, Andrew Gierth wrote:
>>>>>> "S" == S Bob <sbob@quadratum-braccas.com> writes:
> 
>  S> Hi all;
> 
>  S> Does PostgreSQL store a unique cluster or instance identifier that
>  S> we can access to identify our instances?
> 
> Yes. But it's not easy to get at: it's the "Database system identifier"
> shown in the output of pg_controldata. (pg12+ will have a function to
> get it from SQL, but released versions don't.)

Umm, that function has been there since pg 9.6

select left(version(),17), system_identifier from pg_control_system();
       left        |  system_identifier
-------------------+---------------------
 PostgreSQL 9.6.11 | 6320270156373568679
(1 row)

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (7+ messages)  latest in thread

Message-ID: <da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com>
Permalink:  ../da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com/
Also on:    postgresql.org/message-id/da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com

 · 

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-admin@postgresql.org
  Cc: mail@joeconway.com, andrew@tao11.riddles.org.uk, sbob@quadratum-braccas.com
  Subject: Re: Unique cluster / instance identifier?
  In-Reply-To: <da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com>

* 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