Skip to content

Commit

Permalink
Fix variable names mentioned in comment to match the code.
Browse files Browse the repository at this point in the history
Also, in another comment, explain why holding an insertion slot is a
critical section.

Per review by Amit Kapila.
  • Loading branch information
hlinnaka committed Jul 17, 2013
1 parent 59c02a3 commit 107cbc9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/backend/access/transam/xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,8 @@ ReserveXLogInsertLocation(int size, XLogRecPtr *StartPos, XLogRecPtr *EndPos,
*
* A log-switch record is handled slightly differently. The rest of the
* segment will be reserved for this insertion, as indicated by the returned
* *EndPos_p value. However, if we are already at the beginning of the current
* segment, *StartPos_p and *EndPos_p are set to the current location without
* *EndPos value. However, if we are already at the beginning of the current
* segment, *StartPos and *EndPos are set to the current location without
* reserving any space, and the function returns false.
*/
static bool
Expand Down Expand Up @@ -1575,7 +1575,9 @@ WALInsertSlotAcquireOne(int slotno)
/*
* Lock out cancel/die interrupts until we exit the code section protected
* by the slot. This ensures that interrupts will not interfere with
* manipulations of data structures in shared memory.
* manipulations of data structures in shared memory. There is no cleanup
* mechanism to release the slot if the backend dies while holding one,
* so make this a critical section.
*/
START_CRIT_SECTION();

Expand Down

0 comments on commit 107cbc9

Please sign in to comment.