Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwUsn-00021o-TS for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 11:47:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XwUsm-0006rR-Vr for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 11:47:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XwUsl-0006rK-Ow for pgsql-hackers@postgresql.org; Thu, 04 Dec 2014 11:47:39 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XwUsi-0006pd-FH for pgsql-hackers@postgresql.org; Thu, 04 Dec 2014 11:47:38 +0000 Received: by mail-wg0-f49.google.com with SMTP id n12so14200312wgh.36 for ; Thu, 04 Dec 2014 03:47:34 -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 :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=bOmr04FbROxn/kR42LJzK914Y3VMeDmwrZVug59Ma38=; b=Qfbs6J/i/0lBUdLVoCyFa6MqlBiKSHKMcJ3gr9He3ee15hVLIpOIFSBKJ+FCox6Oum TsgrIagsoes4pfoDgo5EHOBKcb3TSWyt4yOCT3UrufJwOMXj5jeZciT11tNBL4Kcqieh 0LjjpuiPfRvfJbzekkjD2xyaHgqb88sdrQiexqvKD3WrlYRkdkBYn/3P2BxGCThP/67d GIm34MAAQUTGtGTx604dYHHKKkc5WjG5TqiFv7XafTMWbqsH2TFOC3yFo3KyoeeNF3rk M7A/sPA5HGIsYk2zKDKvDR8NxT/XUdJk/gXu2EnJojZ4faQq+FRNnf9T2J2IbWqHZ3T1 2UZA== X-Gm-Message-State: ALoCoQkrCO54FX61KbiNOi6i2W4roNic0cxpyFyKOOD4RLDwn/pEnILnGK/dqpQ5oHs5usHFTbSox0++EqlTiqiPtpwWOG4xlMNE5wSqy/NwlXuB8AWNbRinrqxKLVFsFK9KvKl1pU9VLsl2e1WslYVrGb5mf8ZZQ3KJt9GQlukTZeZd6aE/x7g= X-Received: by 10.180.82.170 with SMTP id j10mr110100246wiy.35.1417693654508; Thu, 04 Dec 2014 03:47:34 -0800 (PST) Received: from [192.168.9.209] (ip-80-113-16-26.ip.prioritytelecom.net. [80.113.16.26]) by mx.google.com with ESMTPSA id ud1sm40179294wjc.7.2014.12.04.03.47.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Dec 2014 03:47:33 -0800 (PST) Message-ID: <548049D5.1000605@2ndquadrant.com> Date: Thu, 04 Dec 2014 12:47:33 +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: Heikki Linnakangas , 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> In-Reply-To: <548044CF.5010809@vmware.com> Content-Type: text/plain; charset=utf-8; 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 04/12/14 12:26, Heikki Linnakangas wrote: > On 12/04/2014 01:16 PM, Petr Jelinek wrote: >> On 04/12/14 10:42, Heikki Linnakangas wrote: >>> 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. >> >> That's API meant to be used by extensions, maybe it would be preferable >> if there was SQL API exposed also? >> >> (It might also make more sense once replication identifiers are >> submitted.) > > Maybe. Hard to tell without any documentation or comments on how it's > supposed to work. In unacceptable in its current state. > > I would prefer to remove it now, and add it back later together with the > code that actually uses it. I don't like having unused internal > functions and APIs sitting the source tree in the hope that someone will > find them useful in the future. It's more likely that it will bitrot, or > not actually work as intended, when someone later tries to use it. The thing is I already have extension for 9.4 where I would use this API for conflict detection if it was available so it's not about hoping for somebody to find it useful. There was discussion about this during the review process because the objection was raised already then. > > 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... -- 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