Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc21e6e2

Browse files
committed
Clear CurrentResourceOwner earlier in CommitTransaction.
Alexander reported a crash with repeated create + drop database, afterthe ResourceOwner rewrite (commitb8bff07). That was fixed by theprevious commit, but it nevertheless seems like a good idea clearCurrentResourceOwner earlier, because you're not supposed to use itfor anything after we start releasing it.Reviewed-by: Alexander LakhinDiscussion:https://www.postgresql.org/message-id/11b70743-c5f3-3910-8e5b-dd6c115ff829%40gmail.com
1 parent325f540 commitc21e6e2

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)

[8]ページ先頭

©2009-2025 Movatter.jp