@ -65,7 +65,7 @@ PageInit(Page page, Size pageSize, Size specialSize)
* Check that the page header and checksum ( if any ) appear valid .
* Check that the page header and checksum ( if any ) appear valid .
*
*
* This is called when a page has just been read in from disk . The idea is
* This is called when a page has just been read in from disk . The idea is
* to cheaply detect trashed pages before we go nuts following bogus item
* to cheaply detect trashed pages before we go nuts following bogus line
* pointers , testing invalid transaction identifiers , etc .
* pointers , testing invalid transaction identifiers , etc .
*
*
* It turns out to be necessary to allow zeroed pages here too . Even though
* It turns out to be necessary to allow zeroed pages here too . Even though
@ -170,12 +170,12 @@ PageIsVerified(Page page, BlockNumber blkno)
* reason . A WARNING is issued indicating the reason for the refusal .
* reason . A WARNING is issued indicating the reason for the refusal .
*
*
* offsetNumber must be either InvalidOffsetNumber to specify finding a
* offsetNumber must be either InvalidOffsetNumber to specify finding a
* free item pointer , or a value between FirstOffsetNumber and one past
* free line pointer , or a value between FirstOffsetNumber and one past
* the last existing item , to specify using that particular item pointer .
* the last existing item , to specify using that particular line pointer .
*
*
* If offsetNumber is valid and flag PAI_OVERWRITE is set , we just store
* If offsetNumber is valid and flag PAI_OVERWRITE is set , we just store
* the item at the specified offsetNumber , which must be either a
* the item at the specified offsetNumber , which must be either a
* currently - unused item pointer , or one past the last existing item .
* currently - unused line pointer , or one past the last existing item .
*
*
* If offsetNumber is valid and flag PAI_OVERWRITE is not set , insert
* If offsetNumber is valid and flag PAI_OVERWRITE is not set , insert
* the item at the specified offsetNumber , moving existing items later
* the item at the specified offsetNumber , moving existing items later
@ -314,7 +314,7 @@ PageAddItemExtended(Page page,
memmove ( itemId + 1 , itemId ,
memmove ( itemId + 1 , itemId ,
( limit - offsetNumber ) * sizeof ( ItemIdData ) ) ;
( limit - offsetNumber ) * sizeof ( ItemIdData ) ) ;
/* set the item pointer */
/* set the line pointer */
ItemIdSetNormal ( itemId , upper , size ) ;
ItemIdSetNormal ( itemId , upper , size ) ;
/*
/*
@ -529,7 +529,7 @@ PageRepairFragmentation(Page page)
itemidptr - > itemoff > = ( int ) pd_special ) )
itemidptr - > itemoff > = ( int ) pd_special ) )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
errmsg ( " corrupted item pointer: %u " ,
errmsg ( " corrupted line pointer: %u " ,
itemidptr - > itemoff ) ) ) ;
itemidptr - > itemoff ) ) ) ;
itemidptr - > alignedlen = MAXALIGN ( ItemIdGetLength ( lp ) ) ;
itemidptr - > alignedlen = MAXALIGN ( ItemIdGetLength ( lp ) ) ;
totallen + = itemidptr - > alignedlen ;
totallen + = itemidptr - > alignedlen ;
@ -763,7 +763,7 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum)
offset ! = MAXALIGN ( offset ) )
offset ! = MAXALIGN ( offset ) )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
errmsg ( " corrupted item pointer: offset = %u, size = %u " ,
errmsg ( " corrupted line pointer: offset = %u, size = %u " ,
offset , ( unsigned int ) size ) ) ) ;
offset , ( unsigned int ) size ) ) ) ;
/* Amount of space to actually be deleted */
/* Amount of space to actually be deleted */
@ -881,7 +881,7 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
pd_lower , pd_upper , pd_special ) ) ) ;
pd_lower , pd_upper , pd_special ) ) ) ;
/*
/*
* Scan the item pointer array and build a list of just the ones we are
* Scan the line pointer array and build a list of just the ones we are
* going to keep . Notice we do not modify the page yet , since we are
* going to keep . Notice we do not modify the page yet , since we are
* still validity - checking .
* still validity - checking .
*/
*/
@ -901,7 +901,7 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
offset ! = MAXALIGN ( offset ) )
offset ! = MAXALIGN ( offset ) )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
errmsg ( " corrupted item pointer: offset = %u, length = %u " ,
errmsg ( " corrupted line pointer: offset = %u, length = %u " ,
offset , ( unsigned int ) size ) ) ) ;
offset , ( unsigned int ) size ) ) ) ;
if ( nextitm < nitems & & offnum = = itemnos [ nextitm ] )
if ( nextitm < nitems & & offnum = = itemnos [ nextitm ] )
@ -989,14 +989,14 @@ PageIndexTupleDeleteNoCompact(Page page, OffsetNumber offnum)
offset ! = MAXALIGN ( offset ) )
offset ! = MAXALIGN ( offset ) )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
errmsg ( " corrupted item pointer: offset = %u, size = %u " ,
errmsg ( " corrupted line pointer: offset = %u, size = %u " ,
offset , ( unsigned int ) size ) ) ) ;
offset , ( unsigned int ) size ) ) ) ;
/* Amount of space to actually be deleted */
/* Amount of space to actually be deleted */
size = MAXALIGN ( size ) ;
size = MAXALIGN ( size ) ;
/*
/*
* Either set the item pointer to " unused " , or zap it if it ' s the last
* Either set the line pointer to " unused " , or zap it if it ' s the last
* one . ( Note : it ' s possible that the next - to - last one ( s ) are already
* one . ( Note : it ' s possible that the next - to - last one ( s ) are already
* unused , but we do not trouble to try to compact them out if so . )
* unused , but we do not trouble to try to compact them out if so . )
*/
*/
@ -1054,7 +1054,7 @@ PageIndexTupleDeleteNoCompact(Page page, OffsetNumber offnum)
* other tuples ' data up or down as needed to keep the page compacted .
* other tuples ' data up or down as needed to keep the page compacted .
* This is better than deleting and reinserting the tuple , because it
* This is better than deleting and reinserting the tuple , because it
* avoids any data shifting when the tuple size doesn ' t change ; and
* avoids any data shifting when the tuple size doesn ' t change ; and
* even when it does , we avoid moving the item pointers around .
* even when it does , we avoid moving the line pointers around .
* Conceivably this could also be of use to an index AM that cares about
* Conceivably this could also be of use to an index AM that cares about
* the physical order of tuples as well as their ItemId order .
* the physical order of tuples as well as their ItemId order .
*
*
@ -1099,7 +1099,7 @@ PageIndexTupleOverwrite(Page page, OffsetNumber offnum,
offset ! = MAXALIGN ( offset ) )
offset ! = MAXALIGN ( offset ) )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
( errcode ( ERRCODE_DATA_CORRUPTED ) ,
errmsg ( " corrupted item pointer: offset = %u, size = %u " ,
errmsg ( " corrupted line pointer: offset = %u, size = %u " ,
offset , ( unsigned int ) oldsize ) ) ) ;
offset , ( unsigned int ) oldsize ) ) ) ;
/*
/*