Re: Vacuum questions... - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Vacuum questions...
Date
Msg-id 20050928002203.GF30974@pervasive.com
Whole thread Raw
In response to Re: Vacuum questions...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Sep 27, 2005 at 07:12:21PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
> > AFAIK, this should allow both to run in seperate transactions.
> 
> ... and pretty much destroy any synchronization between the two scans,
> which was sort of the point wasn't it?

Aren't there ways to sync them outside of a transaction? My theory is
that you don't need to syncronize them at the tuple level, since
whichever one gets ahead reading the HEAP will be pulling the data off
the drive, while the one that's behind will just grab it out of the
buffer (or at worst, the kernel's cache). So all you should need to do
is start both scans at about (as in within a few seconds) the same time.

Heck, if vacuum was made to put more verbose info in it's process status
then it could be as simple as having pg_dump start a vacuum of a table
in a seperate connection and just watching for the status to indicate it
had started vacuuming the table.

I *think* this shouldn't be too hard to test, which is good since it's
all theory right now. :)
-- 
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: "Jim C. Nasby"
Date:
Subject: Re: \d on database with a lot of tables is slow
Next
From: Bruce Momjian
Date:
Subject: Re: Open items list for 8.1