Clear CurrentResourceOwner earlier in CommitTransaction.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 15 Nov 2023 09:34:35 +0000 (10:34 +0100)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 15 Nov 2023 10:03:49 +0000 (11:03 +0100)
commitc21e6e2fd48cdcfe7d01eed243d576c722ef8de5
tree11648ce09c1c68cf3e2bcdf444f1408c64f44188
parent325f54033e59499cfc087932f68eec5356061640
Clear CurrentResourceOwner earlier in CommitTransaction.

Alexander reported a crash with repeated create + drop database, after
the ResourceOwner rewrite (commit b8bff07daa). That was fixed by the
previous commit, but it nevertheless seems like a good idea clear
CurrentResourceOwner earlier, because you're not supposed to use it
for anything after we start releasing it.

Reviewed-by: Alexander Lakhin
Discussion: https://www.postgresql.org/message-id/11b70743-c5f3-3910-8e5b-dd6c115ff829%40gmail.com
src/backend/access/transam/xact.c