Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwSwG-0004X8-LU for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 09:43:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XwSwF-0003T2-IY for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 09:43:07 +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 1XwSwE-0003St-E6 for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 09:43:06 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XwSw7-0005LO-PK for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 09:43:04 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 0C15E281AE; Thu, 4 Dec 2014 01:42:52 -0800 (PST) Received: from EX13-CAS-013.vmware.com (EX13-CAS-013.vmware.com [10.113.191.65]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 036B140D18; Thu, 4 Dec 2014 01:42:52 -0800 (PST) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-012.vmware.com (10.113.191.32) with Microsoft SMTP Server (TLS) id 15.0.913.22; Thu, 4 Dec 2014 01:43:30 -0800 Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.913.22; Thu, 4 Dec 2014 01:42:38 -0800 Message-ID: <54802C7F.90606@vmware.com> Date: Thu, 4 Dec 2014 11:42:23 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Alvaro Herrera , PostgreSQL-development Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps References: In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -6.9 (------) 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 12/03/2014 04:54 PM, Alvaro Herrera wrote: > ir commit timestamp directly as they commit, > or an external transaction c Sorry, I'm late to the party, but here's some random comments on this after a quick review: * The whole concept of a node ID seems to be undocumented, and unused. No-one calls CommitTsSetDefaultNodeId(). The whole SET_TS record type is dead code too, when a non-default node_id is not set. Please remove, or explain how all that's supposed to work. * COMMIT_TS_SETTS. "SETTS" sounds like a typo (like Robert complained about "committs" earlier). Rename to "COMMIT_TS_SET_TIMESTAMP", or just "COMMIT_TS_SET". * committsdesc.c -> commit_ts_desc.c, to be consistent with "commit_ts.c" * In commit_ts_desc: > + nsubxids = ((XLogRecGetDataLen(record) - SizeOfCommitTsSet) / > + sizeof(TransactionId)); > + if (nsubxids > 0) > + { > + int i; > + TransactionId *subxids; > + > + subxids = palloc(sizeof(TransactionId) * nsubxids); > + memcpy(subxids, > + XLogRecGetData(record) + SizeOfCommitTsSet, > + sizeof(TransactionId) * nsubxids); > + for (i = 0; i < nsubxids; i++) > + appendStringInfo(buf, ", %u", subxids[i]); > + pfree(subxids); > + } There's no need to memcpy() here. The subxid array in the WAL record is aligned. * This seems to be a completely unrelated change. > --- a/src/backend/libpq/hba.c > +++ b/src/backend/libpq/hba.c > @@ -1438,7 +1438,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, int line_num) > ereport(LOG, > (errcode(ERRCODE_CONFIG_FILE_ERROR), > errmsg("client certificates can only be checked if a root certificate store is available"), > - errhint("Make sure the configuration parameter \"ssl_ca_file\" is set."), > + errhint("Make sure the configuration parameter \"%s\" is set.", "ssl_ca_file"), > errcontext("line %d of configuration file \"%s\"", > line_num, HbaFileName))); > return false; * What is the definition of "latest commit", in pg_last_committed_xact()? It doesn't necessarily line up with the order of commit WAL records, nor with the order the proc array is updated (i.e. the order that the effects become visible to other backends). It seems confusing to add yet another notion of commit order. Perhaps that's the best we can do, but it needs to be documented. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers