Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBMmT-0005ar-V0 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Apr 2019 17:01:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBMmR-0001Tf-Lj for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Apr 2019 17:00:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBMmR-0001TX-61 for pgsql-bugs@lists.postgresql.org; Tue, 02 Apr 2019 17:00:59 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBMmO-0007ix-5F for pgsql-bugs@lists.postgresql.org; Tue, 02 Apr 2019 17:00:58 +0000 Received: by mail-qt1-x842.google.com with SMTP id v20so15816507qtv.12 for ; Tue, 02 Apr 2019 10:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=8LjZvLZY1oAt8XU0BL5KvR2tF6pUlgw0+0OZo7o5ptA=; b=FYaepyEedF0HNzlabJ34KVmFuQX7uIwumD+hk/YRfj7YNzjYtwkH7QZI7WAONBM16f idBcD4ffRs7eqcwWWukr3x7BQCqZAsWI/r1ZkC1iEKeBns2Q+VTUPvrypEwmFUslRF3G x4EIFK7wK+faQ+HgPU19cMTr9qDTiPxetEk56R7o600ltd/laqKub7R2DnbxdH42BxUV m80XEEPA+RWBbdCerJ8iB3hkyPxZZcLbxIMX5Gq/MvNj+8M6+tyRddKUfFwnefhQGX7n MQZCfedodAM/x4HiJcUAXULamxTYtAff7uJWCHOg8TBKrRsuEbcdUgS7QSiPRAEPMBFr 1j7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=8LjZvLZY1oAt8XU0BL5KvR2tF6pUlgw0+0OZo7o5ptA=; b=VPFqxbKF8Yp7asUSQ4LDMhmSh7IH/HnfJqwHEAU77EQlo80X9CoHDTYsWj1S2p8KBb r2ca1nIWLkJ6sSqIXVGdZ9fFklONccIh3IsY+jmOeqvwKfm1V7EEsAl+QJVzgtrHcUA3 feDf4UelVmGCboJpSWG6MpRCb5Smj+Dn0hr0xXC+CfyezuszDnbx24G/If+idTb4MRId wC4HGj2czmP7DorVw+kPujxy5kQoxRnRoLrQIe/j3mqC9LoZo6ogL/GkWbrHJl6Ejze1 RXWuuPjllACgX1VNQD2ptdUfk1x0cMdv4OabmJkhH8ws5vw1DkocIC8PlHFSVL8XYq7P zb2A== X-Gm-Message-State: APjAAAWuMJTlUvcuakZo3KVv9JI+07cm5NXZ3s+Z8OCoa5YPs5NInWmC KF/hNFbOuU/VlPy7EWXsFFCj0w== X-Google-Smtp-Source: APXvYqzKpt3iN+1PMr3Eprvx14fjoAKzJLPib6bbBISRGxA+tJfzY5icKyztX1XKOufAo34EuUyG0A== X-Received: by 2002:a0c:d1a6:: with SMTP id e35mr59461129qvh.174.1554224455151; Tue, 02 Apr 2019 10:00:55 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id i33sm7729845qtb.64.2019.04.02.10.00.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 10:00:54 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 067691212D5; Tue, 2 Apr 2019 14:00:52 -0300 (-03) Date: Tue, 2 Apr 2019 14:00:51 -0300 From: Alvaro Herrera To: Andres Freund Cc: Tom Lane , r.zharkov@postgrespro.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15727: PANIC: cannot abort transaction 295144144, it was already committed Message-ID: <20190402170051.GA22324@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190402161320.o5wkbp7evuzqe4c2@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-02, Andres Freund wrote: > On 2019-04-02 12:51:08 -0300, Alvaro Herrera wrote: > > AFAICS this error can only come from ExecDelete(), because the value 1 > > is TM_Invisible and the other callsites where the "unexpected > > table_lock_tuple" error appears use different wording for that one. > > Hm? Why couldn't it be the ExecUpdate() case? You're right, that one too. > > Maybe it's the result of a deferred constraint being checked at that > > time ... maybe it's trying to honor an "on cascade delete" setting for > > an FK, and the affected tuple has already been updated or deleted? > > Then it ought to get TM_Deleted, no? We ought to wait till that > transaction commits, and then roll back. I was thinking that this would have happened in the same transaction; but yeah I didn't spend too much time analyzing the exact code flow. Anyway I agree that there's something odd going on, and perhaps you just unmasked an earlier bug. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services