Re: pg_system_identifier()

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_system_identifier()
Date: 2013-08-22 13:21:28
Message-ID: CAHGQGwGjvRF=g8+QVEjNDb5Rbhkbgd6_4fphU2tA6FmUA-LGdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 22, 2013 at 9:53 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
> On 08/22/2013 02:51 PM, 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?
>
> It's information about the server that's only accessible through
> pg_controldata.

BTW, you can see the system identifier by executing IDENTIFY_SYSTEM
command in replication connection as follows:

1. Change the server settings so that the server can accept the
replication connection
2. Connect to the server in replication mode
3. Execute IDENTIFY_SYSTEM command in replication connection

$ psql "replication=1"
=# IDENTIFY_SYSTEM;
systemid | timeline | xlogpos
---------------------+----------+-----------
5914930202950905854 | 1 | 0/183F720
(1 row)

This is not good way for a user, though ;P

> I don't know if that's justification enough, which is
> why I didn't add it to the commitfest yet.

You can add the patch to CF, and then hear the opinions from other people
during CF.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jov 2013-08-22 13:23:36 Re: proposal: lob conversion functionality
Previous Message Merlin Moncure 2013-08-22 13:07:44 Re: StrategyGetBuffer optimization, take 2