Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit75df6dc

Browse files
committed
Fix ancient thinko in default table rowcount estimation.
The code used sizeof(ItemPointerData) where sizeof(ItemIdData) is correct,since we're trying to account for a tuple's line pointer. Spotted byTomonari Katsumata (bug #12584).Although this mistake is of very long standing, no back-patch, since it'sa relatively harmless error and changing it would risk changing defaultplanner behavior in stable branches. (I don't see any change in regressiontest outputs here, but the buildfarm may think differently.)
1 parent4c34dcf commit75df6dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/optimizer/util/plancat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
509509

510510
tuple_width=get_rel_data_width(rel,attr_widths);
511511
tuple_width+=sizeof(HeapTupleHeaderData);
512-
tuple_width+=sizeof(ItemPointerData);
512+
tuple_width+=sizeof(ItemIdData);
513513
/* note: integer division is intentional here */
514514
density= (BLCKSZ-SizeOfPageHeaderData) /tuple_width;
515515
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp