From: Petr Jelinek <petr@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Date: Wed, 10 Dec 2014 16:03:18 +0100
Message-ID: <548860B6.50705@2ndquadrant.com> (raw)
In-Reply-To: <CAB7nPqQHCUmWD-2iGbTp27kNhFXwNau60Vyw3+XpBr=AeBTRDg@mail.gmail.com>
References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org>
<54802C7F.90606@vmware.com>
<5480427A.1080200@2ndquadrant.com>
<548044CF.5010809@vmware.com>
<548049D5.1000605@2ndquadrant.com>
<54805306.4030100@vmware.com>
<CAB7nPqQHCUmWD-2iGbTp27kNhFXwNau60Vyw3+XpBr=AeBTRDg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 10/12/14 04:26, Michael Paquier wrote:
> On Thu, Dec 4, 2014 at 9:26 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> Yeah, it was raised. I don't think it was really addressed. There was
>> lengthy discussion on whether to include LSN, node id, and/or some other
>> information, but there was no discussion on:
>>
>> * What is a node ID?
>> * How is it used?
>> * Who assigns it?
>>
>> etc.
>>
>> None of those things are explained in the documentation nor code comments.
>>
>> The node ID sounds suspiciously like the replication identifiers that have
>> been proposed a couple of times. I don't remember if I like replication
>> identifiers or not, but I'd rather discuss that issue explicitly and
>> separately. I don't want the concept of a replication/node ID to fly under
>> the radar like this.
Replication identifiers are bigger thing but yes there is overlap as the
nodeid itself makes it possible to implement replication identifiers
outside of core if needed.
>>
>>>> What would the SQL API look like, and what would it be used for?
>>>
>>>
>>> It would probably mirror the C one, from my POV it's not needed but
>>> maybe some replication solution would prefer to use this without having
>>> to write C components...
>>
>>
>> I can't comment on that, because without any documentation, I don't even
>> know what the C API is.
>>
>> BTW, why is it OK that the node-ID of a commit is logged as a separate WAL
>> record, after the commit record? That means that it's possible that a
>> transaction commits, but you crash just before writing the SETTS record, so
>> that after replay the transaction appears committed but with the default
>> node ID.
>>
>> (Maybe that's OK given the intended use case, but it's hard to tell without
>> any documentation. See a pattern here? ;-) )
This is actually good point, it's not OK to have just commit record but
no nodeid record if nodeid was set.
>
> Could it be possible to get a refresh on that before it bitrots too
> much or we'll simply forget about it? In the current state, there is
> no documentation able to explain what is the point of the nodeid
> stuff, how to use it and what use cases it is aimed at. The API in
> committs.c should as well be part of it. If that's not done, I think
> that it would be fair to remove this portion and simply WAL-log the
> commit timestamp its GUC is activated.
I have this on my list so it's not being forgotten and I don't see it
bitrotting unless we are changing XLog api again. I have bit busy
schedule right now though, can it wait till next week? - I will post
some code documentation patches then.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: petr@2ndquadrant.com, michael.paquier@gmail.com, hlinnakangas@vmware.com, alvherre@alvh.no-ip.org, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
In-Reply-To: <548860B6.50705@2ndquadrant.com>
References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org> <54802C7F.90606@vmware.com> <5480427A.1080200@2ndquadrant.com> <548044CF.5010809@vmware.com> <548049D5.1000605@2ndquadrant.com> <54805306.4030100@vmware.com> <CAB7nPqQHCUmWD-2iGbTp27kNhFXwNau60Vyw3+XpBr=AeBTRDg@mail.gmail.com> <548860B6.50705@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox