Content-Length: 271347 | pFad | http://github.com/postgrespro/postgres/commit/c21e6e2fd48cdcfe7d01eed243d576c722ef8de5

68 Clear CurrentResourceOwner earlier in CommitTransaction. · postgrespro/postgres@c21e6e2 · GitHub
Skip to content

Commit c21e6e2

Browse files
committed
Clear CurrentResourceOwner earlier in CommitTransaction.
Alexander reported a crash with repeated create + drop database, after the ResourceOwner rewrite (commit b8bff07). 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
1 parent 325f540 commit c21e6e2

File tree

1 file changed

+1
-1
lines changed
  • src/backend/access/transam

1 file changed

+1
-1
lines changed

src/backend/access/transam/xact.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,7 @@ CommitTransaction(void)
23092309
CallXactCallbacks(is_parallel_worker ? XACT_EVENT_PARALLEL_COMMIT
23102310
: XACT_EVENT_COMMIT);
23112311

2312+
CurrentResourceOwner = NULL;
23122313
ResourceOwnerRelease(TopTransactionResourceOwner,
23132314
RESOURCE_RELEASE_BEFORE_LOCKS,
23142315
true, true);
@@ -2374,7 +2375,6 @@ CommitTransaction(void)
23742375
AtEOXact_LogicalRepWorkers(true);
23752376
pgstat_report_xact_timestamp(0);
23762377

2377-
CurrentResourceOwner = NULL;
23782378
ResourceOwnerDelete(TopTransactionResourceOwner);
23792379
s->curTransactionOwner = NULL;
23802380
CurTransactionResourceOwner = NULL;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/c21e6e2fd48cdcfe7d01eed243d576c722ef8de5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy