| From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_system_identifier() |
| Date: | 2013-08-22 13:42:05 |
| Message-ID: | 20130822134205.GC17006@awork2.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)fearing(at)dalibo(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | bricklen | 2013-08-22 14:47:50 | Re: pg_system_identifier() |
| Previous Message | Andres Freund | 2013-08-22 13:39:24 | Re: Backup throttling |