Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wjsse-0006R6-QL for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2014 16:15:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wjsse-0007gc-AK for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2014 16:15:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wjssd-0007gT-AN for pgsql-hackers@postgresql.org; Mon, 12 May 2014 16:15:07 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WjssX-0001IF-TF for pgsql-hackers@postgresql.org; Mon, 12 May 2014 16:15:05 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 931052912C; Mon, 12 May 2014 09:14:58 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 8B51E40996; Mon, 12 May 2014 09:14:58 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id BCE7CC0060; Mon, 12 May 2014 09:15:03 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Mon, 12 May 2014 09:15:02 -0700 (PDT) Message-ID: <5370F37F.4060104@vmware.com> Date: Mon, 12 May 2014 19:14:55 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Andres Freund CC: Rajeev rastogi , Ants Aasma , PostgreSQL-development , Markus Wanner Subject: Re: Proposal for CSN based snapshots References: <51B1CB35.4050406@bluegap.ch> <51B6C97B.1070000@bluegap.ch> <5370D323.1070606@vmware.com> <20140512144112.GB9619@awork2.anarazel.de> <5370E267.2020904@vmware.com> <20140512152628.GC9619@awork2.anarazel.de> In-Reply-To: <20140512152628.GC9619@awork2.anarazel.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.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 05/12/2014 06:26 PM, Andres Freund wrote: >> >With the new "commit-in-progress" status in clog, we won't need the >> >sub-committed clog status anymore. The "commit-in-progress" status will >> >achieve the same thing. > Wouldn't that cause many spurious waits? Because commit-in-progress > needs to be waited on, but a sub-committed xact surely not? Ah, no. Even today, a subxid isn't marked as sub-committed, until you commit the top-level transaction. The sub-commit state is a very transient state during the commit process, used to make the commit of the sub-transactions and the top-level transaction appear atomic. The commit-in-progress state would be a similarly short-lived state. You mark the subxids and the top xid as commit-in-progress just before the XLogInsert() of the commit record, and you replace them with the real LSNs right after XLogInsert(). - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers