Re: Automatic free space map filling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Automatic free space map filling
Date: 2006-02-27 18:42:26
Message-ID: 20974.1141065746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> We've seen database applications that PostgreSQL simply could not manage
> because one would have to vacuum continuously. Perhaps in those
> situations one could arrange it that an update (or delete) of a row
> registers the space in the free space map right away, on the assumption
> that by the time it is up for reuse, the transaction will likely have
> committed.

The free-space map is not the hard part of the problem. You still have
to VACUUM --- that is, wait until the dead tuple is not only committed
dead but is certainly dead to all onlooker transactions, and then remove
its index entries as well as the tuple itself. The first part of this
makes it impossible for a transaction to be responsible for vacuuming
its own detritus.

> Naturally, this would need to be secured in some way,

The FSM is only a hint anyway --- if it points someone to a page that in
reality does not have adequate free space, nothing bad happens except
for the wasted cycles to visit the page and find that out. See the loop
in RelationGetBufferForTuple().

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-27 18:52:59 Re: [PATCHES] display and expression of the home directory in Win32
Previous Message Clark C. Evans 2006-02-27 18:37:03 Re: constraints and sql92 information_schema compliance