mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Small improvements in comments in async.c.
We seem to have lost a line somewhere along the way in the comment block that discusses async.c's locks, because it suddenly refers to "both locks" without previously having mentioned more than one. Add a sentence to make that 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 value called "tail".
This commit is contained in:
parent
a16db3a07d
commit
6057f61b4d
@ -224,6 +224,7 @@ typedef struct QueueBackendStatus
|
|||||||
* When holding the lock in EXCLUSIVE mode, backends can inspect the entries
|
* When holding the lock in EXCLUSIVE mode, backends can inspect the entries
|
||||||
* of other backends and also change the head and tail pointers.
|
* of other backends and also change the head and tail pointers.
|
||||||
*
|
*
|
||||||
|
* AsyncCtlLock is used as the control lock for the pg_notify SLRU buffers.
|
||||||
* In order to avoid deadlocks, whenever we need both locks, we always first
|
* In order to avoid deadlocks, whenever we need both locks, we always first
|
||||||
* get AsyncQueueLock and then AsyncCtlLock.
|
* get AsyncQueueLock and then AsyncCtlLock.
|
||||||
*
|
*
|
||||||
@ -234,7 +235,7 @@ typedef struct QueueBackendStatus
|
|||||||
typedef struct AsyncQueueControl
|
typedef struct AsyncQueueControl
|
||||||
{
|
{
|
||||||
QueuePosition head; /* head points to the next free location */
|
QueuePosition head; /* head points to the next free location */
|
||||||
QueuePosition tail; /* the global tail is equivalent to the tail
|
QueuePosition tail; /* the global tail is equivalent to the pos
|
||||||
* of the "slowest" backend */
|
* of the "slowest" backend */
|
||||||
TimestampTz lastQueueFillWarn; /* time of last queue-full msg */
|
TimestampTz lastQueueFillWarn; /* time of last queue-full msg */
|
||||||
QueueBackendStatus backend[FLEXIBLE_ARRAY_MEMBER];
|
QueueBackendStatus backend[FLEXIBLE_ARRAY_MEMBER];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user