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

From Jim C. Nasby
Subject Re: Automatic free space map filling
Date
Msg-id 20060502154957.GL97354@pervasive.com
Whole thread Raw
In response to Re: Automatic free space map filling  ("Dawid Kuroczko" <qnex42@gmail.com>)
List pgsql-hackers
On Mon, May 01, 2006 at 10:24:50PM +0200, Dawid Kuroczko wrote:
> VACUUM table WHERE some_col > now()-'1 hour'::interval;
> 
> I.e. Let vacuum run "piggyback" on some index.  This would allow
> for a quick vacuum of a fraction of a large table.  Especially when
> the table is large, and only some data (new data) are being modified.
> 
> The vacuum for such a table would:
> 1. scan the index accoriding to the where criteria and create bitmap
>  of blocks to look at.
> 2. go through these blocks and vacuum them.
> 
> Hmm, another perhaps silly idea -- a special index kind for tracking
> tuple deaths.  Ie -- something like whenever tuple is updated/deleted,
> insert an entry into such index, using last session the tuple is visible
> for as a key.  Then, perhaps, vacuum could scan such an index and
> find tuples which are candidates for removal.  I lack the knowledge of
> PostgreSQL's internals, so forgive me if I am writing something
> completely insane. :)

There is a TODO to create a 'dead space map' which would cover #2 and
probably eliminate any use for #1.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas DCP SD"
Date:
Subject: Re: XLOG_BLCKSZ vs. wal_buffers table
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Is a SERIAL column a "black box", or not?