gcc46_xlog.patch
text/x-patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlog.c | 5 | 0 |
| src/include/access/xlog_internal.h | 6 | 0 |
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 3681,3694 **** ReadRecord(XLogRecPtr *RecPtr, int emode, bool fetching_ckpt)
*/
if (XLOG_BLCKSZ - (RecPtr->xrecoff % XLOG_BLCKSZ) < SizeOfXLogRecord)
{
! NextLogPage(tmpRecPtr);
/* We will account for page header size below */
}
! if (tmpRecPtr.xrecoff >= XLogFileSize)
{
! (tmpRecPtr.xlogid)++;
! tmpRecPtr.xrecoff = 0;
}
}
else
--- 3681,3694 ----
*/
if (XLOG_BLCKSZ - (RecPtr->xrecoff % XLOG_BLCKSZ) < SizeOfXLogRecord)
{
! NextLogPage(RecPtr);
/* We will account for page header size below */
}
! if (RecPtr->xrecoff >= XLogFileSize)
{
! (RecPtr->xlogid)++;
! RecPtr->xrecoff = 0;
}
}
else
***************
*** 3725,3731 **** retry:
* XRecOffIsValid eliminated the zero-page-offset case otherwise. Need
* to skip over the new page's header.
*/
! tmpRecPtr.xrecoff += pageHeaderSize;
targetRecOff = pageHeaderSize;
}
else if (targetRecOff < pageHeaderSize)
--- 3725,3731 ----
* XRecOffIsValid eliminated the zero-page-offset case otherwise. Need
* to skip over the new page's header.
*/
! RecPtr->xrecoff += pageHeaderSize;
targetRecOff = pageHeaderSize;
}
else if (targetRecOff < pageHeaderSize)
*** a/src/include/access/xlog_internal.h
--- b/src/include/access/xlog_internal.h
***************
*** 154,166 **** typedef XLogLongPageHeaderData *XLogLongPageHeader;
/* Align a record pointer to next page */
#define NextLogPage(recptr) \
do { \
! if (recptr.xrecoff % XLOG_BLCKSZ != 0) \
! recptr.xrecoff += \
! (XLOG_BLCKSZ - recptr.xrecoff % XLOG_BLCKSZ); \
! if (recptr.xrecoff >= XLogFileSize) \
{ \
! (recptr.xlogid)++; \
! recptr.xrecoff = 0; \
} \
} while (0)
--- 154,166 ----
/* Align a record pointer to next page */
#define NextLogPage(recptr) \
do { \
! if (recptr->xrecoff % XLOG_BLCKSZ != 0) \
! recptr->xrecoff += \
! (XLOG_BLCKSZ - recptr->xrecoff % XLOG_BLCKSZ); \
! if (recptr->xrecoff >= XLogFileSize) \
{ \
! (recptr->xlogid)++; \
! recptr->xrecoff = 0; \
} \
} while (0)