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 1hWmmL-0001tu-Jf for pgsql-bugs@arkaria.postgresql.org; Fri, 31 May 2019 19:01:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hWmmJ-0004YF-Vm for pgsql-bugs@arkaria.postgresql.org; Fri, 31 May 2019 19:01:23 +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 1hWmmJ-0004Uo-Ji for pgsql-bugs@lists.postgresql.org; Fri, 31 May 2019 19:01:23 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWmmH-0005Lk-I2 for pgsql-bugs@lists.postgresql.org; Fri, 31 May 2019 19:01:23 +0000 Received: by mail-lj1-x22b.google.com with SMTP id y15so7391875ljd.9 for ; Fri, 31 May 2019 12:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=QPTxNyxfs0dceh6dDvMH0Rn/LqVcXO8h4Mp6jgI+jXk=; b=X1Thzlmc8DqhijjAhkKtbUmruDqGtWIHVHmRKZ239t/E4bahd6LsZVxtT/MAOkAzJ6 xrJKyZ4caiyg4nyiv6RmbGwM/TW+YIno/1XdYc4xhUzyWeEeAbi7c2EGHwFkg/+FGo+2 iHWK87hmuuOVRtpxAJN+6N44D5xxoKvSMq+lIbc8tLsQ219quXdlg9AATQ95tkswvX7q cvGKAzGaFHQX8+Z9y+/2AhHu5TPgsWc0coLVs1BeK3kvx+kjJHUc6kOTuoiscchVDOIF oWU8JJFnjiriPCU/VRDBnoCGynA1Qzczyd3z9icev7bCKjlcPlU+cK+xfLxIYOFbfR5D i2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=QPTxNyxfs0dceh6dDvMH0Rn/LqVcXO8h4Mp6jgI+jXk=; b=s9ffZfJwRBKXSJz49ddFj1FVEaeqQa2k3fPdCRiB4POYGyuNeLxUhI5i+EL+whyt81 2PRyoIvl93YbqUYk8IwdR387i0M235GduJrTaJKSc8egoaN5Owa9cvZKFeZQKyXKCqB0 FaTBIjCIbpNu8tcVLEhPbebAGs5vdfc5SF4mvB0hbfU/b2Plsa5SN8L3jHNeRwPZoXWs tQbr422ZQn3oJegf/Cp71wp7W0dghIHisY+NB0OCprRsuYta31YvAqf38Yvyv8EpKWLI nSyrSa5i1oLPSoQBmu1aPx4Q+iwOz2Ca3acrv+BuTFa1riss5fgOBnrDmnVRwpyN+BJK E0sw== X-Gm-Message-State: APjAAAV3lJzHX692pKVruM++OFs84FEjpSMWv07HmNWudvVoSUcZStAb a4Y5aPpF8/1U+WTzMx8lbwr0V1Ld X-Google-Smtp-Source: APXvYqwWPvTIcEImhxd8xOTuNdbq5LD40jKv/jU1nXkZS4gKu8zioREj0vWKjKcvIdeVVDSGCgWobA== X-Received: by 2002:a2e:8088:: with SMTP id i8mr5421029ljg.95.1559329279244; Fri, 31 May 2019 12:01:19 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.179]) by smtp.gmail.com with ESMTPSA id t28sm184343lfq.67.2019.05.31.12.01.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 12:01:18 -0700 (PDT) Subject: Re: BUG #15828: Server crashes inside CloneRowTriggersToPartition To: pgsql-bugs@lists.postgresql.org References: <15828-f6ddd7df4852f473@postgresql.org> From: Alexander Lakhin Message-ID: Date: Fri, 31 May 2019 22:01:17 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <15828-f6ddd7df4852f473@postgresql.org> Content-Type: multipart/mixed; boundary="------------8616BA9A00DA4BFAC56C1C45" Content-Language: ru-RU List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------8616BA9A00DA4BFAC56C1C45 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit > 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 --------------8616BA9A00DA4BFAC56C1C45 Content-Type: text/x-patch; name="reproduce-15828.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="reproduce-15828.patch" 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 --------------8616BA9A00DA4BFAC56C1C45--