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      [EMAIL PROTECTED]
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to