Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xyine-0005Yq-6D for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Dec 2014 15:03:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xyinc-0006fP-NI for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Dec 2014 15:03:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xyinb-0006fI-6h for pgsql-hackers@postgresql.org; Wed, 10 Dec 2014 15:03:31 +0000 Received: from mail-wg0-f46.google.com ([74.125.82.46]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XyinS-00043j-8Q for pgsql-hackers@postgresql.org; Wed, 10 Dec 2014 15:03:29 +0000 Received: by mail-wg0-f46.google.com with SMTP id x13so3866816wgg.19 for ; Wed, 10 Dec 2014 07:03:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=O8BwN6FAp6b04tAlhmGjgnhE6C6HkQ35Pco6d1bgbaw=; b=ijmJ1oGTtVtpetr03qRzhGca5vc1I4uxkOJUoLrPPfj/tDVkgR1XG/SyVarSrxBwdY M+n1HIzhrEmA2ITt9iGUntmy2389KZOCl5xG13/U0dU/m6YqJLMaqjnN9ibgAie/esm7 asCxPsCrcpbdu+TPD4dvGSDJZp80zRBAAJ1eebt+QzYkjYIa0nqMSKVykIb3p90mmr7/ cg/ooI6nPFjBsqysU/BHOQjxF/K34xK11jA/4edtDWLvrkLoX7tvENLKrAJ/wxVJAfos qRFrxV9h6PPC20P979DIg1XdHQOtaDwiFG9a4wUujvuhP6J54hLzD8OvlAC7iGbL5Orm 28wA== X-Gm-Message-State: ALoCoQmOHJHRlaSLxx7rLHEM/0eTagXnEVt7vTv/rbi0tJdYspmhn3DRX6B4A5MxM4iiL9amVW8T2gMYSAY8uwIJ+jBF8/vjHiyZUsx6/6b0DzLuu+/h2pZ6GYREjW9DUMPoSEUqjw2TIKjW1nsa9nsO/3DWgc/uHIrfTJiSgBSBdb/PMMTgHM8= X-Received: by 10.194.246.130 with SMTP id xw2mr7185879wjc.33.1418223800204; Wed, 10 Dec 2014 07:03:20 -0800 (PST) Received: from [10.1.0.3] (190.84.broadband17.iol.cz. [109.80.84.190]) by mx.google.com with ESMTPSA id bo18sm6663744wib.11.2014.12.10.07.03.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Dec 2014 07:03:19 -0800 (PST) Message-ID: <548860B6.50705@2ndquadrant.com> Date: Wed, 10 Dec 2014 16:03:18 +0100 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Michael Paquier , Heikki Linnakangas CC: Alvaro Herrera , PostgreSQL-development Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps References: <54802C7F.90606@vmware.com> <5480427A.1080200@2ndquadrant.com> <548044CF.5010809@vmware.com> <548049D5.1000605@2ndquadrant.com> <54805306.4030100@vmware.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 10/12/14 04:26, Michael Paquier wrote: > On Thu, Dec 4, 2014 at 9:26 PM, Heikki Linnakangas > 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