Re: Remove xmin and cmin from frozen tuples - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Remove xmin and cmin from frozen tuples
Date
Msg-id 20050901131556.4E5A.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Whole thread Raw
In response to Re: Remove xmin and cmin from frozen tuples  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Remove xmin and cmin from frozen tuples
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> 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




pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: broken configure, broken makefile?
Next
From: Gavin Sherry
Date:
Subject: Re: broken configure, broken makefile?