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 1iwULM-0004CM-C4 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Jan 2020 17:08:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iwULL-0006EK-84 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Jan 2020 17:08:03 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iwULK-0006ED-Sc for pgsql-bugs@lists.postgresql.org; Tue, 28 Jan 2020 17:08:03 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iwULH-0005f7-VM for pgsql-bugs@lists.postgresql.org; Tue, 28 Jan 2020 17:08:02 +0000 Received: by mail-wm1-x342.google.com with SMTP id f129so3417005wmf.2 for ; Tue, 28 Jan 2020 09:07:59 -0800 (PST) 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:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=HfuXyUeunf7UqTc1seog0rzEMp5e+m0B11c9UFpYbLw=; b=PFPNGjvUu6z6+0sc+d4zW7rQZ9AXq3TGgrnjJPFdb68DO8tV4JMZnJlXvh86+XtC+O wAs0otifR9KedWIaQo6Li9c4Wi6jrPi+BEvGu8+WP7ILJsTa2kgeY7QAVpexLl8/aRg0 nl6yjAfXOJ4loPUKqFU67EcBbxukeWCAK1xzn7e3DqLpwzTlsk1tMHvfq/WomkV6PJXl Y8JmSral/A6D8X5vQHxrI71o2boaqzc5uIl7atX2r7H3k5SxawytTHVwvF0kU1Gn5gB/ /NxgrhEvL+GwiYhyL2yoFdrG3iK8UmlRUrkTPmABaOdMM2l9wCwsN5P02NY36xTqndQy m34g== 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=HfuXyUeunf7UqTc1seog0rzEMp5e+m0B11c9UFpYbLw=; b=g2j9ZkYHDbntLY5cfgqHLP1KnV2bCf+LsXWpCrfNOJV7A79dl5t7MeMODL0gzTqfsp y+y0tfMfjSIxGUMYyJi0GrGzCwVmBBnvqgOGEoHwvVF7o7mpnafIQiosTjIir5Zd5TWz TcwXDDCA6wK0uZYGnUe7j6fJDwCMWTSztao7ZphdHJABGFCE1Ml3vnnlMRlQMXyf0rem XaYlYn3mFlMh8NqlPZ7TxVZvKuXZJDzzVy+nIsZIbwhlIYJjLPRoxJUqv3Y84mJltd+x XZrfYJE4Rqu7XVUwskglRgkE1Ad0U/O/mCL1n9DZfFpkCsR3+Z7IThRruG/in9rN1YDy +pNQ== X-Gm-Message-State: APjAAAWPrE509fdh+WmF21KN7f83HmcHygQApLH5coE1kp2F4mckb1G7 2HfX6f04YRRLtkU6Q8tx3zlfbA== X-Google-Smtp-Source: APXvYqwYGVUcbqWryrYxK9++YIgnqEICL4Vc7VHtYOQ2p1f2CZLXhP3oLMtT2s/ycrvZ3BCODa4R3g== X-Received: by 2002:a1c:e28a:: with SMTP id z132mr5964431wmg.157.1580231278777; Tue, 28 Jan 2020 09:07:58 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id n14sm3818210wmi.26.2020.01.28.09.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 09:07:57 -0800 (PST) Date: Tue, 28 Jan 2020 18:07:55 +0100 From: Tomas Vondra To: Oleksii Kliukin Cc: pgsql-bugs@lists.postgresql.org, ildus@adjust.com, Chris Travers , Nick Babadzhanian , julian.schauder@gmx.de Subject: Re: postgres crash on concurrent update of inheritance partitioned table Message-ID: <20200128170755.bq3f27bfkjpt4d4b@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jan 28, 2020 at 05:17:14PM +0100, Oleksii Kliukin wrote: >Hello there, > >We have experienced a few crashes a day since upgrading to pg 12.1 last >week, during the process of updating an inheritance-partitioned table by >several concurrent sessions. > >Here’s the reproducer that consistency crashes pg 12.1 (and master) on my >machine. > >Setup: > >create table p(flag boolean); >create table c1() inherits(p); >create table c2() inherits(p); >insert into c1 select false from generate_series(1,10); >insert into c2 select false from generate_series(1,10); > >session 1: session 2: >begin; begin >update p set flag = true; > update p set flag = true; >commit; server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed. > Yeah, I can reproduce it too. If I had to guess, I'd say it's another bug due to commit 3fb307bc4a76815f96fec28a0d1525ab3fbbcfb4 Author: Andres Freund Date: Mon Sep 9 05:21:30 2019 -0700 Reorder EPQ work, to fix rowmark related bugs and improve efficiency. which introduced relsubs_done et al, and perhaps did not get the life cycle / resetting right. Not sure. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services