aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-07-17 23:27:15 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-07-17 23:32:32 +0300
commit107cbc90a7564b6cd773c56ad3da8b66c7377df5 (patch)
tree21051a078c857cfef58a860e417acfd85dc7b80e
parent59c02a36f0ef317958b2d14313b5c8e41cfd9be6 (diff)
downloadpostgresql-107cbc90a7564b6cd773c56ad3da8b66c7377df5.tar.gz
postgresql-107cbc90a7564b6cd773c56ad3da8b66c7377df5.zip
Fix variable names mentioned in comment to match the code.
Also, in another comment, explain why holding an insertion slot is a critical section. Per review by Amit Kapila.
-rw-r--r--src/backend/access/transam/xlog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8d43660353f..96aceb9e087 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -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
@@ -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();