]> granicus.if.org Git - postgresql/commit
Cancel CV sleep during subtransaction abort.
authorRobert Haas <rhaas@postgresql.org>
Thu, 21 Dec 2017 14:09:04 +0000 (09:09 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 21 Dec 2017 14:24:48 +0000 (09:24 -0500)
commitf3decdc94ea3dea05715325757db7b0295672bbe
tree7d46e9a5bb5fea5d3af0879788ab7db80b9137b0
parent7be0d775a2e78d052c00f154741e9d8d76166fa3
Cancel CV sleep during subtransaction abort.

Generally, error recovery paths that need to do things like
LWLockReleaseAll and pgstat_report_wait_end also need to call
ConditionVariableCancelSleep, but AbortSubTransaction was missed.

Since subtransaction abort might destroy up the DSM segment that
contains the ConditionVariable stored in cv_sleep_target, this
can 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
src/backend/access/transam/xact.c