Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5Xjd-0006c0-IL for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2014 10:39:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y5Xjc-00019H-Ak for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2014 10:39:36 +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 1Y5Xja-000199-Mv for pgsql-hackers@postgresql.org; Mon, 29 Dec 2014 10:39:34 +0000 Received: from mail-wi0-f170.google.com ([209.85.212.170]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y5XjX-0003NN-86 for pgsql-hackers@postgresql.org; Mon, 29 Dec 2014 10:39:32 +0000 Received: by mail-wi0-f170.google.com with SMTP id bs8so23262871wib.1 for ; Mon, 29 Dec 2014 02:39:29 -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=u3+Y5v+M32BOMSTwcCUCUjV1zlva7eM+oUKYIqMMwww=; b=ds1XmxTGho259m+y9JQ3ekrYNZNobmUepz80Ektn13+/QEJ5/jYuFC3yA9sDqMytpT eV5GBJD/a4OuFNRt73P4MY56NlwtBgIlJXnb+g/LFut4yHb9y7Tl6FEfsg7WllY0my4m SjjiVx8yyGxU3K5K4qhRgn7f8WKdoGMLATbPVz1zHmUP70H9hIok/XU6WgI1t9bFhsp0 WpkINf7MBOVZwZQHTm+QKKVVQfPK/5pC4DIj2n6J2d2R7UCvMOG0v9o3qXieBAEU6nbu 4CaQcGVQAUGqiPrs1RD6HwYh5F3iBJLteUQ3HQZoJ8Si3N9Bom3xGHW0UgtPtersCCTV ok/w== X-Gm-Message-State: ALoCoQmwRtPhVbQBU8+H0pkJgHNEjJRDWps4iu4l7xTBYas/QrdJMqhYm2fjgh2j40/+GHAJGjwU0NQGfgyp45E9fETQzJ8cxZGCDKpidraR+n83iyaPvd1JBpz4qKUSDxCvUTiOJmZsWvShbkIhQ6jpF/wHz8uGFrlkUCvKL92aRq1lqZ1TYbg= X-Received: by 10.194.246.130 with SMTP id xw2mr104498682wjc.33.1419849569239; Mon, 29 Dec 2014 02:39:29 -0800 (PST) Received: from [10.1.0.3] (190.84.broadband17.iol.cz. [109.80.84.190]) by mx.google.com with ESMTPSA id j1sm49446704wjw.25.2014.12.29.02.39.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Dec 2014 02:39:28 -0800 (PST) Message-ID: <54A12F5F.2030503@2ndquadrant.com> Date: Mon, 29 Dec 2014 11:39:27 +0100 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andres Freund , Heikki Linnakangas CC: Michael Paquier , 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> <548860B6.50705@2ndquadrant.com> <5493F04C.6090900@2ndquadrant.com> <54A1278F.8070608@vmware.com> <20141229101646.GB16114@alap3.anarazel.de> In-Reply-To: <20141229101646.GB16114@alap3.anarazel.de> 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 29/12/14 11:16, Andres Freund wrote: > On 2014-12-29 12:06:07 +0200, Heikki Linnakangas wrote: >> That's a little bit better, but I have to say I'm still not impressed. There >> are so many implicit assumptions in the system. The first assumption is that >> a 32-bit node id is sufficient. > > Seriously? Are we going to build facilities for replication systems with > that many nodes? It seems absolutely unrealistic that a) somebody does > this b) that we'll blindly meet the demands of such a super hypothetical > scenario. > +1, Honestly, if somebody will ever have setup with more nodes than what fits into 32bits they will run into bigger problems than nodeid being too small. >> Then there's the assumption that the node id should be "sticky", >> i.e. it's set for the whole session. Again, I'm sure that's useful for >> many systems, but I could just as easily imagine that you'd want it to >> reset after every commit. > > It's trivial to add that/reset it manually. So what? Yes you can reset in the extension after commit, or you can actually override both commit timestamp and nodeid after commit if you so wish. > >> To be honest, I think this patch should be reverted. Instead, we should >> design a system where extensions can define their own SLRUs to store >> additional per-transaction information. That way, each extension can have as >> much space per transaction as needed, and support functions that make most >> sense with the information. Commit timestamp tracking would be one such >> extension, and for this node ID stuff, you could have another one (or >> include it in the replication extension). > > If somebody wants that they should develop it. But given that we, based > on previous discussions, don't want to run user defined code in the > relevant phase during transaction commit *and* replay I don't think it'd > be all that easy to do it fast and flexible. > Right, I would love to have custom SLRUs but I don't see it happening given those two restrictions, otherwise I would write the CommitTs patch that way in the first place... -- 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