Re: Vacuum now uses AccessShareLock for analyze

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum now uses AccessShareLock for analyze
Date: 2000-05-29 16:54:27
Message-ID: 200005291654.MAA13690@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> its what I suspected, but my point was that if we did the ANALYZE for the
> relation right after the VACUUM for it, there would be a period of time
> where readers could come in and process ... think of it as a 'breather'
> before the next VACUUM starts, vs just jumping into the next ...
>
> Overall time for doing the vacuum shouldn't be any longer, but it would
> give gaps where readers could get in and out ... we're a relational
> database, so I imagine ppl are doing JOINs ... if RelationA is locked
> while ReaderA is trying to doign a JOIN between RA and RB, ReaderA is
> gonna be screwed ... if we did a quick ANALZE between RelationA and
> RelationB, then ReaderA would have a chance to do its processing while the
> ANALYZE is running, instead of having to wait for both RelationA and
> RelationB to be finished ...

Good point. Because we are only doing one table at a time, they could
get in and do something, but they could also get part-way in and have
another table locked, and since we are only locking one at a time, it
seemed better to get it all done first. Comments?

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-29 17:05:35 Re: Vacuum now uses AccessShareLock for analyze
Previous Message Tom Lane 2000-05-29 16:48:23 Re: Additional system indexes