Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5Xue-0007Bx-Ph for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2014 10:51:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y5Xue-0003B6-9r for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2014 10:51:00 +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 1Y5Xuc-0003An-EW for pgsql-hackers@postgresql.org; Mon, 29 Dec 2014 10:50:58 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y5XuS-0003eY-QZ for pgsql-hackers@postgresql.org; Mon, 29 Dec 2014 10:50:54 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 77586283EC; Mon, 29 Dec 2014 02:50:46 -0800 (PST) Received: from EX13-CAS-012.vmware.com (EX13-CAS-012.vmware.com [10.113.191.64]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 6FCB719606; Mon, 29 Dec 2014 02:50:46 -0800 (PST) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-013.vmware.com (10.113.191.33) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 29 Dec 2014 02:50:40 -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; Mon, 29 Dec 2014 02:50:39 -0800 Message-ID: <54A131EF.3080600@vmware.com> Date: Mon, 29 Dec 2014 12:50:23 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Petr Jelinek , Andres Freund 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> <54A12F5F.2030503@2ndquadrant.com> In-Reply-To: <54A12F5F.2030503@2ndquadrant.com> Content-Type: text/plain; charset="windows-1252"; 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/29/2014 12:39 PM, Petr Jelinek wrote: > On 29/12/14 11:16, Andres Freund wrote: >> On 2014-12-29 12:06:07 +0200, Heikki Linnakangas wrote: >>> 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... Transaction commit and replay can treat the per-transaction information as an opaque blob. It just needs to be included in the commit record, and replay needs to write it to the SLRU. That way you don't need to run any user-defined code in those phases. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers