summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2020-11-25 06:04:20 +0000
committerAndres Freund2020-11-25 06:08:55 +0000
commitcb127598299d70828bb93fe840cacd1c045fe278 (patch)
tree75ecbe107e43d103df8d0f830b29b2a352ce0c9d
parent4a45ff4f654c84f2b79aabe97288d0c451ceced7 (diff)
aio: WIP: Don't execute local completions when in crit section.
Should we do something similar for shared completions? Seems more complicated. Author: Reviewed-By: Discussion: https://postgr.es/m/ Backpatch:
-rw-r--r--src/backend/storage/ipc/aio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/aio.c b/src/backend/storage/ipc/aio.c
index 699158b88b..4fc712c424 100644
--- a/src/backend/storage/ipc/aio.c
+++ b/src/backend/storage/ipc/aio.c
@@ -1241,7 +1241,7 @@ pgaio_drain(PgAioContext *context, bool in_error)
/*
* Call all pending local callbacks.
*/
- if (my_aio->local_completed_count != 0)
+ if (my_aio->local_completed_count != 0 && CritSectionCount == 0)
{
static int recursion_count = 0;