Re: Unique cluster / instance identifier?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "S(dot) Bob" <sbob(at)quadratum-braccas(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Unique cluster / instance identifier?
Date: 2019-02-18 18:40:02
Message-ID: da5904c4-cbe2-fb02-3a5d-42d8f18a057d@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 2/18/19 1:03 PM, Andrew Gierth wrote:
>>>>>> "S" == S Bob <sbob(at)quadratum-braccas(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew Gierth 2019-02-18 18:51:15 Re: Unique cluster / instance identifier?
Previous Message MichaelDBA 2019-02-18 18:07:55 Re: Unique cluster / instance identifier?