mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Remove obsolete XLogRecPtr macros
This gets rid of XLByteLT, XLByteLE, XLByteEQ and XLByteAdvance. These were useful for brevity when XLogRecPtrs were split in xlogid/xrecoff; but now that they are simple uint64's, they are just clutter. The only downside to making this change would be ease of backporting patches, but that has been negated by other substantive changes to the involved code anyway. The clarity of simpler expressions makes the change worthwhile. Most of the changes are mechanical, but in a couple of places, the patch author chose to invert the operator sense, making the code flow more logical (and more in line with preceding comments). Author: Andres Freund Eyeballed by Dimitri Fontaine and Alvaro Herrera
This commit is contained in:
@ -64,7 +64,7 @@ gistRedoClearFollowRight(XLogRecPtr lsn, XLogRecord *record, int block_index,
|
||||
* of this record, because the updated NSN is not included in the full
|
||||
* page image.
|
||||
*/
|
||||
if (!XLByteLT(lsn, PageGetLSN(page)))
|
||||
if (lsn >= PageGetLSN(page))
|
||||
{
|
||||
GistPageGetOpaque(page)->nsn = lsn;
|
||||
GistClearFollowRight(page);
|
||||
@ -119,7 +119,7 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record)
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
|
||||
/* nothing more to do if change already applied */
|
||||
if (XLByteLE(lsn, PageGetLSN(page)))
|
||||
if (lsn <= PageGetLSN(page))
|
||||
{
|
||||
UnlockReleaseBuffer(buffer);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user