Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group