Re: Automatic free space map filling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Automatic free space map filling
Date
Msg-id 20974.1141065746@sss.pgh.pa.us
Whole thread Raw
In response to Automatic free space map filling  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Automatic free space map filling
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


pgsql-hackers by date:

Previous
From: "Clark C. Evans"
Date:
Subject: Re: constraints and sql92 information_schema compliance
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] display and expression of the home directory in Win32