Mark Mielke wrote:
> Stefan Kaltenbrunner wrote:
>> Heikki Linnakangas wrote:
>>> 2. Pointer swinging. At the moment, after a row is HOT updated, the only
>>> way to get rid of the redirecting line pointer is to run VACUUM FULL or
>>> CLUSTER (or delete or cold update the row and vacuum). If we want to
>>> implement pointer swinging before release, we have to get started now.
>>> If we're happy to release without it and address the issue in later
>>> releases if it seems important, we need to make a conscious decision on
>>> that, now. I personally think we can release without it.
>> hmm - I don't really understand most of the stuff behind HOT but does
>> this mean that VACUUM FULL (or CLUSTER) is becoming a recommended or
>> even required routine maintenance task for people using HOT ?
> No more than before. See the comment "or delete or cold update the row
> and vacuum". The row couldn't be cleared by vacuum before unless
> delete/update. Based on the above, it appears that every time an HOT
> update occurs, 4 to 8 bytes might get wasted in the page. Eventually
> this fills the page and a regular cold update is required and it is
> cleared.

To be clear, the first time a row is HOT updated, and the old version is
pruned later, the line pointer of the old version is turned into a
redirecting line pointer and the old tuple version is removed. On
subsequent HOT updates and prunings of the same row, the redirecting
line pointer is modified to point to the newer version, but no new
redirecting line pointers are left behind.

IOW, there will be one redirecting line pointer per row that has ever
been HOT updated.

The patch also introduces the concept of redirected dead line pointers.
When a HOT updated tuple (actually, as the patch stands, any tuple) is
deleted, or COLD updated, the tuple itself is pruned away, and the
redirecting line pointer is marked as dead. A redirected dead line
pointer acts just like a dead tuple for all purposes, but it takes much
less space. Redirected dead line pointers can accumulate on a page, but
you don't need a VACUUM FULL to get rid of them, a normal vacuum is enough.

  Heikki Linnakangas

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at


Reply via email to