Alvaro Herrera <[EMAIL PROTECTED]> wrote:

> Now, one thing of note is that you need to "compress" the page in order
> to actually be able to use the just-freed space.  VACUUM could do that,
> but maybe it would be better to do it on-line -- the freezing process is
> going to have to write the page regardless.

I agree. I think an good position of freezer is on bgwriter.
My idea is:
  1. Just before bgwriter writes an dirty page in LRU order,
  2. Freeze tuples in the page and repair fragmentation.
  3. (Replace the fsm page that has least freespace.)
  4. Flush the page.


> I wonder if with your patch
> the page is compressed on the same VACUUM execution that freezes the tuple?

Yes, defragmentation is performed after freezing, but the page has at least
one dead tuple. In current VACUUM implementation, pages that have no dead
tuples will not be defraged. So you cannot "compress" just after bulk-load.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to