Re: Reviving Time Travel (was Re: 'TID index') - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reviving Time Travel (was Re: 'TID index')
Date
Msg-id 1410.1096585889@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reviving Time Travel (was Re: 'TID index')  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Reviving Time Travel (was Re: 'TID index')
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> One idea would be to vacuum the page if it can be determined that the
> relation doesn't have indexes.  This information is generally not known,

... especially not by the page writer.  You can't assume that you have
access to the relation descriptor --- for instance, it's entirely
possible that the bgwriter (or another backend) will need to push out a
dirty page that belongs to a newly created relation for which the
catalog data remains uncommitted.  There are related scenarios involving
uncommitted drops.

More generally I think that invoking VACUUM processing from the bgwriter
would be a serious violation of the module hierarchy, and would inflict
more pain in the form of bugs and maintenance headaches than it could
possibly be worth.  We just this version managed to get smgr decoupled
from the relcache, like it should have been all along.  (bufmgr should
be too, but I haven't tackled that yet...)  This was actually a
necessary step to make the separate bgwriter feasible.  Let's not
reverse that cleanup in pursuit of dubious optimizations.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: CREATE INDEX speeds up query on 31 row table ...
Next
From: Bernd Helmle
Date:
Subject: Bug in CREATE VIEW grammar