From: Tom Lane <tgl@sss.pgh.pa.us>
To: thomas.d.mckay@gmail.com
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17607: Server process crashes when PLpgSQL function raises error in subtransaction
Date: Mon, 05 Sep 2022 13:16:19 -0400
Message-ID: <2452250.1662398179@sss.pgh.pa.us> (raw)
In-Reply-To: <17607-bd8ccc81226f7f80@postgresql.org>
References: <17607-bd8ccc81226f7f80@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> I've encountered a bug while doing some SQL migrations on a PostgreSQL 13.8
> server. My initial use-case is a Django app running migrations, a test setup
> and a test, but that code was more than 10K lines of DDL, so I've reduced
> the code to a minimal reproducible example (as best I could).
Thanks for the minimal reproducer! I confirm that this problem is visible
in the v12 and v13 branches, but not before or after. On the master
branch, it was introduced at
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master Release: REL_14_BR [25936fd46] 2021-02-27 18:09:15 -0300
Fix use-after-free bug with AfterTriggersTableData.storeslot
and repaired, seemingly accidentally, by
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_14_BR [c5b7ba4e6] 2021-04-06 15:57:11 -0400
Postpone some stuff out of ExecInitModifyTable.
25936fd46 was back-patched into v12 and v13, which is why they show
the bug. c5b7ba4e6 was not back-patched, both because it'd be way too
invasive and because we weren't aware that it was fixing anything.
I'm not really sure that it *did* fix anything --- perhaps there are
variants of this example that still fail?
cc'ing Alvaro for comment.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, thomas.d.mckay@gmail.com, alvherre@alvh.no-ip.org, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17607: Server process crashes when PLpgSQL function raises error in subtransaction
In-Reply-To: <2452250.1662398179@sss.pgh.pa.us>
* 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