Bruce Momjian <bruce@momjian.us> wrote:
> Patch applied. Thanks.
Thank you for applying, but sorry, my patch has some incompletions.
1. A debug code is left. Assert() and if-test are redundant.
2. Add a comment on the average FSM request size. Now, the size
contains not only the size of tuples, but also freespace on pages.
Especially, there may be a room to discuss on 2; it changed the meaning of
'average request size'. If it is enough only to add a comment, please apply
the following fixes.
diff -cpr pgsql-orig/src/backend/access/heap/hio.c pgsql/src/backend/access/heap/hio.c
*** pgsql-orig/src/backend/access/heap/hio.c Mon Jul 3 09:22:49 2006
--- pgsql/src/backend/access/heap/hio.c Mon Jul 3 10:22:40 2006
*************** RelationGetBufferForTuple(Relation relat
*** 108,115 ****
otherBlock;
bool needLock;
- if (relation->rd_options == NULL)
- elog(ERROR, "RelationGetBufferForTuple %s IS NULL", RelationGetRelationName(relation));
Assert(relation->rd_options != NULL);
len = MAXALIGN(len); /* be conservative */
--- 108,113 ----
diff -cpr pgsql-orig/src/backend/storage/freespace/freespace.c pgsql/src/backend/storage/freespace/freespace.c
*** pgsql-orig/src/backend/storage/freespace/freespace.c Mon Jul 3 09:22:50 2006
--- pgsql/src/backend/storage/freespace/freespace.c Mon Jul 3 10:30:26 2006
*************** RecordAndGetPageWithFreeSpace(RelFileNod
*** 341,346 ****
--- 341,348 ----
/*
* GetAvgFSMRequestSize - get average FSM request size for a relation.
*
+ * Retuened value is the average of item size plus freespace specified
+ * by fillfactor.
* If the relation is not known to FSM, return a default value.
*/
Size
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center