Hi Noah,

Thanks for taking a look at this patch.

> 
> In evaluating whether this is a good choice of value, I think about the
> expected page lifecycle.  A tuple barely larger than fillfactor (roughly
> len=1+BLCKSZ*fillfactor/100) will start on a roughly-empty page.  As long as
> the tuple exists, the server will skip that page for inserts.  Updates can 
> cause
> up to floor(99/fillfactor) same-size versions of the tuple to occupy the page
> simultaneously, creating that many line pointers.  At the fillfactor=10
> minimum, it's good to accept otherwise-empty pages having at least nine line
> pointers, so a page can restart the aforementioned lifecycle.  Tolerating even
> more line pointers helps when updates reduce tuple size or when the page
> was used for smaller tuples before it last emptied.  At the BLCKSZ=8192
> default, this maxPaddedFsmRequest allows 36 line pointers (good or
> somewhat high).  At the BLCKSZ=1024 minimum, it allows 4 line pointers
> (low).  At the BLCKSZ=32768 maximum, 146 (likely excessive).  I'm not
> concerned about optimizing non-default block sizes, so let's keep your
> proposal.
> 

Agreed. You briefly mention this already, but the case that caused me to report 
this was exactly the one where under normal circumstances each UPDATE would be 
small. However, in rare cases, the tuple that is updated grows in size to 1k 
bytes (the specific case we encountered sometimes would under specific 
circumstances write extra info in a field, which would otherwise be NULL). 
Suppose that this 1k UPDATE does not fit into the current page (so no HOT 
update), then a new page would be created (HEAD behavior). However, it is very 
likely that the next updates to this same tuple will be the regular size again. 
This causes the higher number of line pointers on the page.

-Floris



Reply via email to