1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Install new alignment code to use MAXALIGN rather than DOUBLEALIGN where

approproate.
This commit is contained in:
Bruce Momjian
1999-07-19 07:07:29 +00:00
parent e259780b13
commit faf7d78174
19 changed files with 70 additions and 69 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.52 1999/07/17 20:16:39 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.53 1999/07/19 07:07:18 momjian Exp $
*
*
* INTERFACE ROUTINES
@ -1280,7 +1280,7 @@ l2:
HEAP_XMAX_INVALID | HEAP_MARKED_FOR_UPDATE);
/* insert new item */
if ((unsigned) DOUBLEALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
if ((unsigned) MAXALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
RelationPutHeapTuple(relation, buffer, newtup);
else
{

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Id: hio.c,v 1.25 1999/07/16 04:58:27 momjian Exp $
* $Id: hio.c,v 1.26 1999/07/19 07:07:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -50,7 +50,7 @@ RelationPutHeapTuple(Relation relation,
IncrHeapAccessStat(global_RelationPutHeapTuple);
pageHeader = (Page) BufferGetPage(buffer);
len = (unsigned) DOUBLEALIGN(tuple->t_len); /* be conservative */
len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
Assert((int) len <= PageGetFreeSpace(pageHeader));
offnum = PageAddItem((Page) pageHeader, (Item) tuple->t_data,
@ -143,7 +143,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
pageHeader = (Page) BufferGetPage(buffer);
len = (unsigned) DOUBLEALIGN(tuple->t_len); /* be conservative */
len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
/*
* Note that this is true if the above returned a bogus page, which it