Skip to content

Commit ed96bfd

Browse files
committed
Here is the definition of relation_byte_size() in optimizer/path/costsize.c:
---------------------------------------------------------------------- /* * relation_byte_size * Estimate the storage space in bytes for a given number of tuples * of a given width (size in bytes). */ static double relation_byte_size(double tuples, int width) { return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleData))); } ---------------------------------------------------------------------- Shouldn't this be HeapTupleHeaderData and not HeapTupleData ? (Of course, from a costing perspective these shouldn't be very different but ...) Sailesh Krishnamurthy
1 parent bb58eed commit ed96bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/path/costsize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* Portions Copyright (c) 1994, Regents of the University of California
5050
*
5151
* IDENTIFICATION
52-
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.117 2003/12/03 17:45:07 tgl Exp $
52+
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.118 2003/12/18 03:46:45 momjian Exp $
5353
*
5454
*-------------------------------------------------------------------------
5555
*/
@@ -1969,7 +1969,7 @@ set_rel_width(Query *root, RelOptInfo *rel)
19691969
static double
19701970
relation_byte_size(double tuples, int width)
19711971
{
1972-
return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleData)));
1972+
return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleHeaderData)));
19731973
}
19741974

19751975
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy