Re: Automatic free space map filling

From: "Zeugswetter Andreas DCP SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Automatic free space map filling
Date: 2006-03-02 08:53:57
Message-ID: E1539E0ED7043848906A8FF995BDA579D989B5@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> I thought we had sufficiently destroyed that "reuse a tuple"
> meme yesterday. You can't do that: there are too many
> aspects of the system design that are predicated on the
> assumption that dead tuples do not come back to life. You
> have to do the full vacuuming bit (index entry removal,
> super-exclusive page locking, etc) before you can remove a dead tuple.

One more idea I would like to throw in.
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.
(If you still wanted to be able to locate index entries fast,
you would need to keep indexed columns, but I think we agreed that there
is
no real use)

I think that would be achievable at reasonable cost (since you can avoid
one page IO)
on the page of the currently active tuple (the first page that is
considered).

On this page:
if freespace available
--> use it
elsif freespace available after reducing all dead rows
--> use the freespace with a new slot
else ....

Of course this only works when we still have free slots,
but I think that might not really be an issue.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2006-03-02 09:02:58 Re: Automatic free space map filling
Previous Message James_Hughes 2006-03-02 07:50:32 Re: Initdb on Windows 2003

Browse pgsql-patches by date

  From Date Subject
Next Message Hannu Krosing 2006-03-02 09:07:00 Re: Automatic free space map filling
Previous Message Dmitry Karasik 2006-03-02 07:08:39 Re: implement prepared queries in plperl