pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15828: Server crashes inside CloneRowTriggersToPartition
Date: Fri, 31 May 2019 22:01:17 +0300
Message-ID: <c0580b75-829a-172d-7488-7fecd058e259@gmail.com> (raw)
In-Reply-To: <15828-f6ddd7df4852f473@postgresql.org>
References: <15828-f6ddd7df4852f473@postgresql.org>

> The following bug has been logged on the website:
>
> Bug reference:      15828
> Logged by:          Alexander Lakhin
> Email address:      exclusion@gmail.com
> PostgreSQL version: 12beta1
> Operating system:   Ubuntu 18.04
> Description:        
>
> When running in parallel two queries (modified excerpts from
> src/test/regress/ join.sql and update.sql):
The patch to reproduce the crash on master is attached,
With the patch applied, you can execute
'EXTRA_TESTS="--schedule=test_schedule" make check' and get:
...
test stats                        ... ok          642 ms
parallel group (2 tests):  join1 update1
     join1                        ... FAILED       43 ms
     update1                      ... FAILED (test process exited with
exit code 2)      530 ms
============== shutting down postmaster               ==============
...

Best regards,
Alexander

Attachments:

reproduce-15828.patch (text/x-patch, 1.7K) download diff --git a/src/test/regress/expected/join1.out b/src/test/regress/expected/join1.out new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/test/regress/expected/update1.out b/src/test/regress/expected/update1.out new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/test/regress/sql/join1.sql b/src/test/regress/sql/join1.sql new file mode 100644 index 0000000000..69efb73b2f --- /dev/null +++ b/src/test/regress/sql/join1.sql @@ -0,0 +1,3 @@ +SELECT count(*) FROM + tenk1 a JOIN tenk1 b ON a.unique1 = b.unique2 + LEFT JOIN tenk1 c ON c.thousand = a.thousand; diff --git a/src/test/regress/sql/update1.sql b/src/test/regress/sql/update1.sql new file mode 100644 index 0000000000..d9b41b0375 --- /dev/null +++ b/src/test/regress/sql/update1.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS range_parted CASCADE; +DROP FUNCTION IF EXISTS trigfunc CASCADE; + +CREATE TABLE range_parted (b bigint) PARTITION BY RANGE (b); +CREATE TABLE part_1_10 PARTITION OF range_parted FOR VALUES FROM (1) TO (10); + +CREATE FUNCTION trigfunc() RETURNS TRIGGER LANGUAGE plpgsql AS 'begin return null; end;'; + +CREATE TRIGGER trigger1 AFTER INSERT ON range_parted FOR EACH STATEMENT EXECUTE PROCEDURE trigfunc(); + +CREATE TRIGGER trigger2 AFTER INSERT ON range_parted FOR EACH STATEMENT EXECUTE PROCEDURE trigfunc(); +DROP TRIGGER trigger2 ON range_parted; + +INSERT INTO range_parted VALUES (0); +SELECT pg_sleep(0.05); +CREATE TABLE part_def PARTITION OF range_parted DEFAULT; diff --git a/src/test/regress/test_schedule b/src/test/regress/test_schedule new file mode 100644 index 0000000000..04c3b29c59 --- /dev/null +++ b/src/test/regress/test_schedule @@ -0,0 +1 @@ +test: join1 update1

view thread (3+ messages)  latest in thread

Message-ID: <c0580b75-829a-172d-7488-7fecd058e259@gmail.com>
Permalink:  ../c0580b75-829a-172d-7488-7fecd058e259@gmail.com/
Also on:    postgresql.org/message-id/c0580b75-829a-172d-7488-7fecd058e259@gmail.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: exclusion@gmail.com
  Subject: Re: BUG #15828: Server crashes inside CloneRowTriggersToPartition
  In-Reply-To: <c0580b75-829a-172d-7488-7fecd058e259@gmail.com>
  References: <15828-f6ddd7df4852f473@postgresql.org> <c0580b75-829a-172d-7488-7fecd058e259@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox