@@ -7681,12 +7681,9 @@ XLogRestorePoint(const char *rpName)
76817681 * records. In that case, multiple copies of the same block would be recorded
76827682 * in separate WAL records by different backends, though that is still OK from
76837683 * a correctness perspective.
7684- *
7685- * Note that this only works for buffers that fit the standard page model,
7686- * i.e. those for which buffer_std == true
76877684 */
76887685XLogRecPtr
7689- XLogSaveBufferForHint (Buffer buffer )
7686+ XLogSaveBufferForHint (Buffer buffer , bool buffer_std )
76907687{
76917688XLogRecPtr recptr = InvalidXLogRecPtr ;
76927689XLogRecPtr lsn ;
@@ -7708,7 +7705,7 @@ XLogSaveBufferForHint(Buffer buffer)
77087705 * and reset rdata for any actual WAL record insert.
77097706 */
77107707rdata [0 ].buffer = buffer ;
7711- rdata [0 ].buffer_std = true ;
7708+ rdata [0 ].buffer_std = buffer_std ;
77127709
77137710/*
77147711 * Check buffer while not holding an exclusive lock.
@@ -7722,6 +7719,9 @@ XLogSaveBufferForHint(Buffer buffer)
77227719 * Copy buffer so we don't have to worry about concurrent hint bit or
77237720 * lsn updates. We assume pd_lower/upper cannot be changed without an
77247721 * exclusive lock, so the contents bkp are not racy.
7722+ *
7723+ * With buffer_std set to false, XLogCheckBuffer() sets hole_length and
7724+ * hole_offset to 0; so the following code is safe for either case.
77257725 */
77267726memcpy (copied_buffer ,origdata ,bkpb .hole_offset );
77277727memcpy (copied_buffer + bkpb .hole_offset ,
@@ -7744,7 +7744,7 @@ XLogSaveBufferForHint(Buffer buffer)
77447744rdata [1 ].buffer = InvalidBuffer ;
77457745rdata [1 ].next = NULL ;
77467746
7747- recptr = XLogInsert (RM_XLOG_ID ,XLOG_HINT ,rdata );
7747+ recptr = XLogInsert (RM_XLOG_ID ,XLOG_FPI ,rdata );
77487748}
77497749
77507750return recptr ;
@@ -8109,14 +8109,14 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
81098109{
81108110/* nothing to do here */
81118111}
8112- else if (info == XLOG_HINT )
8112+ else if (info == XLOG_FPI )
81138113{
81148114char * data ;
81158115BkpBlock bkpb ;
81168116
81178117/*
8118- *Hint bit records contain a backup block stored "inline" in the
8119- * normal data since the locking when writing hint records isn't
8118+ *Full-page image (FPI) records contain a backup block stored "inline"
8119+ *in the normal data since the locking when writing hint records isn't
81208120 * sufficient to use the normal backup block mechanism, which assumes
81218121 * exclusive lock on the buffer supplied.
81228122 *