Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRNvv-00081c-Hz for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Dec 2017 19:52:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRNvu-00063u-QE for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Dec 2017 19:52:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eRNvu-00063k-Cy for pgsql-hackers@lists.postgresql.org; Tue, 19 Dec 2017 19:52:10 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eRNvm-00059b-Tb for pgsql-hackers@postgresql.org; Tue, 19 Dec 2017 19:52:09 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5CAFC20BDE; Tue, 19 Dec 2017 14:52:01 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Tue, 19 Dec 2017 14:52:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=p8bpyi XXh3Atq1cldRnDR2NnRBlHKVlolaTJxuTpZUc=; b=VYUI75JAGnpzWa1KqTA8kd BuxSquT/v7qcAWmugHSazT+YP50K7et14slXMLd0obyn0/gUmNBX72mhTAh2m6lz GzY3jW9PejefrD4sTYvSGPtq7dmRoGbXjxSgTI2QeXQSXH9aGtUK+lfn8tagfUF7 XMZJjZh5w85ufk66rfKHKuYQzFPBzxsGwSsgVpH6xZh/pCWaWHsXIF+2kPzx41Yn 5vx6JLgOZsgclfxT2d3inSXpkl9ekPxY+O41Xrc4olxPtJzNkKXzinlmqBltp4gl Q9Gwa5VlqQsbrvU/GKDOLeH8gdBB9ahL1YHjcL2URIi+ukJeARS3wUcV2A5RGn/g == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 9801C7E537; Tue, 19 Dec 2017 14:52:00 -0500 (EST) Subject: Re: [HACKERS] logical decoding of two-phase transactions To: Nikhil Sontakke , Simon Riggs References: <45525c30-4002-861e-a82c-3b95b19d1514@2ndquadrant.com> Cc: Craig Ringer , Petr Jelinek , Sokolov Yura , Stas Kelvich , Andres Freund , Dmitry Dolgov <9erthalion6@gmail.com>, Tom Lane , Masahiko Sawada , PostgreSQL Hackers , Robert Haas From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Tue, 19 Dec 2017 14:52:00 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/19/17 03:37, Nikhil Sontakke wrote: > Note that this patch does not contain the HeapTupleSatisfiesVacuum > changes. I believe we need changes to HeapTupleSatisfiesVacuum given > than logical decoding changes the assumption that catalog tuples > belonging to a transaction which never committed can be reclaimed > immediately. With 2PC logical decoding or streaming logical decoding, > we can always have a split time window in which the ongoing decode > cycle needs those tuples. The solution is that even for aborted > transactions, we do not return HEAPTUPLE_DEAD if the transaction id is > newer than the OldestXmin (same logic we use for deleted tuples of > committed transactions). We can do this only for catalog table rows > (both system and user defined) to limit the scope of impact. In any > case, this needs to be a separate patch along with a separate > discussion thread. Are you working on that as well? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services