Re: Automatic free space map filling
ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
From: ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2006-03-09T06:52:18Z
Lists: pgsql-hackers
"Zeugswetter Andreas DCP SD" <ZeugswetterA@spardat.at> 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