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

Commit59d1e2b

Browse files
committed
Cancel CV sleep during subtransaction abort.
Generally, error recovery paths that need to do things likeLWLockReleaseAll and pgstat_report_wait_end also need to callConditionVariableCancelSleep, but AbortSubTransaction was missed.Since subtransaction abort might destroy up the DSM segment thatcontains the ConditionVariable stored in cv_sleep_target, thiscan result in a crash for anything using condition variables.Reported and diagnosed by Andres Freund.Discussion:http://postgr.es/m/20171221110048.rxk6464azzl5t2fi@alap3.anarazel.de
1 parent1804284 commit59d1e2b

File tree

1 file changed

+3
-0
lines changed
  • src/backend/access/transam

1 file changed

+3
-0
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4717,6 +4717,9 @@ AbortSubTransaction(void)
47174717
/* Reset WAL record construction state */
47184718
XLogResetInsertion();
47194719

4720+
/* Cancel condition variable sleep */
4721+
ConditionVariableCancelSleep();
4722+
47204723
/*
47214724
* Also clean up any open wait for lock, since the lock manager will choke
47224725
* if we try to wait for another lock before doing this.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp