RE: [HACKERS] Re: [PORTS] vacuum takes too long - Mailing list pgsql-hackers

From Jackson, DeJuan
Subject RE: [HACKERS] Re: [PORTS] vacuum takes too long
Date
Msg-id F10BB1FAF801D111829B0060971D839F5BFABD@cpsmail
Whole thread Raw
List pgsql-hackers
> > With MVCC an occasional 'vacuum analyze' should only be
> noticed from the
> > performance improvements.  As far as I can tell most of the
> work done by
> > an analyze is in reading the table data.  If you make sure
> to write the
> > new information at the end of the transaction you only lock
> the indexes
> > for the amount of time it takes to write them.
> >
> > I see a 'vacuum analyze' being less of a problem than 'vacuum'.
> > Any of you experts can contradict my assumptions.
>
> Good point...I seem to recall that at one point, there was a
> lock imposed
> on one of hte pg_ tables when a vacuum is tarted, since it
> has to update a
> couple of the rows in that table...has that lock been removed
> with MVCC?
> Vadim?

Well, even if a vacuum locks whatever 'pg_'table-row that holds the
indexing statistics for the table in question MVCC won't block the
optimizer's reads.  As long as there are no more vacuum analyzes run
there shouldn't even be a waiting transaction.
    -DEJ

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: RE: [HACKERS] Re: [PORTS] vacuum takes too long
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [PORTS] vacuum takes too long