diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-21 15:13:06 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-21 15:13:06 -0500 |
commit | e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8 (patch) | |
tree | 522fdb9a6b2ed8208bdf692579399eac73c69184 /src/backend/optimizer/util/plancat.c | |
parent | 3d9b6f31eec150b5a6000e0814e81e36d9eb069a (diff) | |
download | postgresql-e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8.tar.gz postgresql-e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8.zip |
Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[].
This requires changing quite a few places that were depending on
sizeof(HeapTupleHeaderData), but it seems for the best.
Michael Paquier, some adjustments by me
Diffstat (limited to 'src/backend/optimizer/util/plancat.c')
-rw-r--r-- | src/backend/optimizer/util/plancat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index fb7db6d9599..5cbd6a98f20 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -508,7 +508,7 @@ estimate_rel_size(Relation rel, int32 *attr_widths, int32 tuple_width; tuple_width = get_rel_data_width(rel, attr_widths); - tuple_width += sizeof(HeapTupleHeaderData); + tuple_width += MAXALIGN(SizeofHeapTupleHeader); tuple_width += sizeof(ItemIdData); /* note: integer division is intentional here */ density = (BLCKSZ - SizeOfPageHeaderData) / tuple_width; |