Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1abrmV-0003pg-Lo for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Mar 2016 15:36:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1abrmV-0005Dp-3x for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Mar 2016 15:36:43 +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) (envelope-from ) id 1abrmU-0005Dj-RN for pgsql-bugs@postgresql.org; Fri, 04 Mar 2016 15:36:42 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1abrmQ-0004YD-UL for pgsql-bugs@postgresql.org; Fri, 04 Mar 2016 15:36:42 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [186.11.224.164]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 1D41A400EFC; Fri, 4 Mar 2016 07:36:35 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 14CBC74B; Fri, 4 Mar 2016 12:36:32 -0300 (CLT) Date: Fri, 4 Mar 2016 12:36:32 -0300 From: Alvaro Herrera To: Andres Freund Cc: jarred@webriots.com, pgsql-bugs@postgresql.org Subject: Re: BUG #13844: Logical decoding bug with subxact + row locking Message-ID: <20160304153632.GA696837@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160207114217.pct2ldvbtdubriy3@alap3.anarazel.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund wrote: > Ugh, that's an annoying bug. Working on producing a fix. > > The problem is that logical decoding expects to know about toplevel xids > before subtransaction/savepoint xids. Which is enforced in the WAL > logging code, so that's ok. But the problem is that right now the WAL > produced looks like (abbreviated): > rmgr: Heap tx: 585, lsn: 0/01A304A8, desc: LOCK off 1: xid 585 LOCK_ONLY EXCL_LOCK KEYS_UPDATED , blkref #0: rel 1663/12385/24607 blk 0 > rmgr: Heap tx: 586, lsn: 0/01A30658, desc: INSERT off 2, blkref #0: rel 1663/12385/24607 blk 0 FPW > rmgr: Transaction tx: 586, lsn: 0/01A30798, desc: ABORT 2016-02-07 12:21:18.624045 CET > rmgr: Standby tx: 0, lsn: 0/01A307C0, desc: RUNNING_XACTS nextXid 587 latestCompletedXid 586 oldestRunningXid 585; 1 xacts: 585 > rmgr: Heap tx: 587, lsn: 0/01A307F8, desc: INSERT off 3, blkref #0: rel 1663/12385/24607 blk 0 > rmgr: Btree tx: 587, lsn: 0/01A30838, desc: INSERT_LEAF off 3, blkref #0: rel 1663/12385/24614 blk 1 > rmgr: Transaction tx: 585, lsn: 0/01A30878, desc: COMMIT 2016-02-07 12:21:28.062978 CET; subxacts: 587 > > and decode.c doesn't care about LOCK records so far. Which means > reorderbuffer.c doesn't know about the relevant xid. Hm. Hi, Any progress with this? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs