aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/async.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/async.c')
-rw-r--r--src/backend/commands/async.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index 2514ffb6443..d8f1408e9e9 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -403,6 +403,9 @@ static void ClearPendingActionsAndNotifies(void);
/*
* We will work on the page range of 0..QUEUE_MAX_PAGE.
+ *
+ * Since asyncQueueIsFull() blocks creation of a page that could precede any
+ * extant page, we need not assess entries within a page.
*/
static bool
asyncQueuePagePrecedes(int p, int q)
@@ -1233,8 +1236,8 @@ asyncQueueIsFull(void)
* logically precedes the current global tail pointer, ie, the head
* pointer would wrap around compared to the tail. We cannot create such
* a head page for fear of confusing slru.c. For safety we round the tail
- * pointer back to a segment boundary (compare the truncation logic in
- * asyncQueueAdvanceTail).
+ * pointer back to a segment boundary (truncation logic in
+ * asyncQueueAdvanceTail does not do this, so doing it here is optional).
*
* Note that this test is *not* dependent on how much space there is on
* the current head page. This is necessary because asyncQueueAddEntries