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

Commit6057f61

Browse files
committed
Small improvements in comments in async.c.
We seem to have lost a line somewhere along the way in the comment blockthat discusses async.c's locks, because it suddenly refers to "both locks"without previously having mentioned more than one. Add a sentence to makethat read more sanely. Also, refer to the "pos of the slowest backend"not the "tail of the slowest backend", since we have no per-backend valuecalled "tail".
1 parenta16db3a commit6057f61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/commands/async.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ typedef struct QueueBackendStatus
224224
* When holding the lock in EXCLUSIVE mode, backends can inspect the entries
225225
* of other backends and also change the head and tail pointers.
226226
*
227+
* AsyncCtlLock is used as the control lock for the pg_notify SLRU buffers.
227228
* In order to avoid deadlocks, whenever we need both locks, we always first
228229
* get AsyncQueueLock and then AsyncCtlLock.
229230
*
@@ -234,7 +235,7 @@ typedef struct QueueBackendStatus
234235
typedefstructAsyncQueueControl
235236
{
236237
QueuePositionhead;/* head points to the next free location */
237-
QueuePositiontail;/* the global tail is equivalent to thetail
238+
QueuePositiontail;/* the global tail is equivalent to thepos
238239
* of the "slowest" backend */
239240
TimestampTzlastQueueFillWarn;/* time of last queue-full msg */
240241
QueueBackendStatusbackend[FLEXIBLE_ARRAY_MEMBER];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp