"Zeugswetter Andreas DCP SD" <[EMAIL PROTECTED]> wrote: > Ok, we cannot reuse a dead tuple. Maybe we can reuse the space of a dead > tuple by reducing the tuple to it's header info.
I was just working about your idea. In my work, bgwriter truncates dead tuples and leaves only their headers. I'll send a concept patch to PATCHES. We must take super-exclusive-lock of pages before vacuum. Bgwriter tries to take exclusive-lock before it writes a page, and does vacuum only if the lock is super-exclusive. Otherwise, it gives up and writes normally. This is an optimistic way, but I assume the possibility is high because the most pages written by bgwriter are least recently used (LRU). Also, I changed bgwriter_lru_maxpages to be adjusted automatically, because backends won't do vacuum not to disturb main transaction processing, so bgwriter should write most of the dirty pages. There are much room for discussion on this idea. Comments are welcome. --- ITAGAKI Takahiro NTT Cyber Space Laboratories ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq