Re: Reviving Time Travel (was Re: 'TID index')

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Hannu Krosing <hannu(at)tm(dot)ee>, "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reviving Time Travel (was Re: 'TID index')
Date: 2004-10-01 00:27:26
Message-ID: 20041001002725.GS1297@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 30, 2004 at 07:11:29PM -0400, Tom Lane wrote:
> 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.

Yeah, I thought about the same thing. It would certainly be more modular
to have a vacuum daemon that runs ahead of the page writer.

As for the indexes, would it be reasonable to see if the required index
pages were already in memory?

Ultimately, it's going to depend on the table and access patterns as to
whether this provides a speed improvement. A table with a lot of indexes
and a lot of updates per page might not see much benefit. A table where
updates are spread across the table would more likely benefit even if it
does have to bring index pages into memory. The alternative is the
vacuum running later, having to bring in the base data page, and then
all the indexes anyway. But once there is a list of pages with dead
tuples only one read and one write would be saved, which probably isn't
worth the extra code.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2004-10-01 00:53:56 Re: SQL-Invoked Procedures for 8.1
Previous Message Bernd Helmle 2004-09-30 23:58:38 Re: Bug in CREATE VIEW grammar