Re: pg_system_identifier() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_system_identifier()
Date
Msg-id 20130822134205.GC17006@awork2.anarazel.de
Whole thread Raw
In response to Re: pg_system_identifier()  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: pg_system_identifier()  (bricklen <bricklen@gmail.com>)
List pgsql-hackers
On 2013-08-22 21:51:22 +0900, Fujii Masao wrote:
> On Thu, Aug 22, 2013 at 6:43 AM, Vik Fearing <vik.fearing@dalibo.com> wrote:
> > After someone in IRC asked if there was an equivalent to MySQL's
> > server_id, it was noted that we do have a system identifier but it's not
> > very accessible.
> >
> > The attached patch implements a pg_system_identifier() function that
> > exposes it.
> 
> What's the use case?
> 
> IIUC, PostgreSQL's system identifier is not equal to MySQL server-id.
> In PostgreSQL, in replication, the master and all the standbys must
> have the same system identifier. OTOH, in MySQL, they have the different
> server-ids. No?

FWIW I've wished for that function repeatedly. Mostly just to make sure
I am actually connected to the same "network" of replicas and not some
other.
It's also useful if you're providing support for a limited number of
machines and you want some form of identifying a node.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: PL/pgSQL, RAISE and error context
Next
From: bricklen
Date:
Subject: Re: pg_system_identifier()