Re: Database system identifier via SELECT? - Mailing list pgsql-general

From David Johnston
Subject Re: Database system identifier via SELECT?
Date
Msg-id 058001ccb5ee$956722f0$c03568d0$@yahoo.com
Whole thread Raw
In response to Re: Database system identifier via SELECT?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Bruce Momjian
Sent: Thursday, December 08, 2011 3:57 PM
To: Chris Redekop
Cc: pgsql-general
Subject: Re: [GENERAL] Database system identifier via SELECT?

Chris Redekop wrote:
> Is there any way to get the database system identifier via a select
> statement?  I have a primary/secondary async replication setup, and
> I'd like be able to verify from the client side that the provided
> primary and secondary connection strings do in fact refer to the same data
set...

Wow, that is a reasonable thing to want available via SQL, but I can't see a
way to get to it.

The only method I can suggest is to write a server-side C function that
calls GetSystemIdentifier().

---------------------------------------------------

Maybe I mis-understand the question but how about:

SHOW listen_addresses; (of the functional equivalent)

You just need to make sure each server is listening to a specific IP and/or
Port and just tag off of that.

David J.



pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Database system identifier via SELECT?
Next
From: Bruce Momjian
Date:
Subject: Re: Database system identifier via SELECT?