Re: postgres crash on concurrent update of inheritance partitioned table

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Oleksii Kliukin <alexk(at)hintbits(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, ildus(at)adjust(dot)com, Chris Travers <chris(dot)travers(at)adjust(dot)com>, Nick Babadzhanian <nickb(at)adjust(dot)com>, julian(dot)schauder(at)gmx(dot)de
Subject: Re: postgres crash on concurrent update of inheritance partitioned table
Date: 2020-01-28 17:07:55
Message-ID: 20200128170755.bq3f27bfkjpt4d4b@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 <andres(at)anarazel(dot)de>
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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-01-28 17:34:37 Re: postgres crash on concurrent update of inheritance partitioned table
Previous Message Tom Lane 2020-01-28 17:02:12 Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created