Re: Reducing relation locking overhead - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Reducing relation locking overhead
Date
Msg-id 20051208061642.GK16053@nasby.net
Whole thread Raw
In response to Re: Reducing relation locking overhead  (Greg Stark <gsstark@mit.edu>)
Responses Re: Reducing relation locking overhead  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
On Sat, Dec 03, 2005 at 10:15:25AM -0500, Greg Stark wrote:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> > What's worse, once you have excluded writes you have to rescan the entire
> > table to be sure you haven't missed anything. So in the scenarios where this
> > whole thing is actually interesting, ie enormous tables, you're still
> > talking about a fairly long interval with writes locked out. Maybe not as
> > long as a complete REINDEX, but long.
> 
> I was thinking you would set a flag to disable use of the FSM for
> inserts/updates while the reindex was running. So you would know where to find
> the new tuples, at the end of the table after the last tuple you read.

What about keeping a seperate list of new tuples? Obviously we'd only do
this when an index was being built on a table. Since it would probably
be problematic and expensive to check for this every time you accessed a
table, it would make sense to check only at the start of a transaction
and have an index build wait until all running transactions knew that an
index build was going to happen.
-- 
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: Reducing relation locking overhead
Next
From: Hannu Krosing
Date:
Subject: Re: Reducing relation locking overhead