mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user