@@ -1322,8 +1322,8 @@ ReserveXLogInsertLocation(int size, XLogRecPtr *StartPos, XLogRecPtr *EndPos,
13221322 *
13231323 * A log-switch record is handled slightly differently. The rest of the
13241324 * segment will be reserved for this insertion, as indicated by the returned
1325- * *EndPos_p value. However, if we are already at the beginning of the current
1326- * segment, *StartPos_p and *EndPos_p are set to the current location without
1325+ * *EndPos value. However, if we are already at the beginning of the current
1326+ * segment, *StartPos and *EndPos are set to the current location without
13271327 * reserving any space, and the function returns false.
13281328*/
13291329static bool
@@ -1575,7 +1575,9 @@ WALInsertSlotAcquireOne(int slotno)
15751575/*
15761576 * Lock out cancel/die interrupts until we exit the code section protected
15771577 * by the slot. This ensures that interrupts will not interfere with
1578- * manipulations of data structures in shared memory.
1578+ * manipulations of data structures in shared memory. There is no cleanup
1579+ * mechanism to release the slot if the backend dies while holding one,
1580+ * so make this a critical section.
15791581 */
15801582START_CRIT_SECTION ();
15811583