Re: VACUUM/ANALYZE counting of in-doubt tuples

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM/ANALYZE counting of in-doubt tuples
Date: 2007-11-21 18:55:49
Message-ID: 47442AD5.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> On Wed, Nov 21, 2007 at 12:32 PM, in message <15089(dot)1195669979(at)sss(dot)pgh(dot)pa(dot)us>,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>> Has this issue been a real problem? If so, probably we should consider
>> adjusting ANALYZE for 8.3 per your proposal.
>
> I'm not sure. Upthread, two or three people said they thought they'd
> seen autovac launching vacuums against tables during bulk inserts.
> However, that could only happen if there were already a reason to launch
> an auto-analyze (which could misreport dead tuples and thus trigger a
> subsequent auto-vacuum), and in typical bulk load situations I don't see
> why that would be very likely to happen.

We had been in the habit of throwing a commit into our bulk loads
periodically (say, every 10,000 or 100,000 rows. This was because
our prior database product needed to keep the entire transaction
image in a fixed-size transaction log until commit; if we didn't
commit now and then, the whole thing locked up and died. I'm not
sure I've seen the behavior since we realized it was just an old
habit and went to a single transaction per table.

> I'm fine with leaving the whole issue for 8.4.

Perhaps a comment somewhere in the documentation regarding the
above should go into releases where this technique can be costly?
Suggesting a single transaction or suspension of autovacuum?

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2007-11-21 19:04:29 8.3devel slower than 8.2 under read-only load
Previous Message Tom Lane 2007-11-21 18:50:52 Re: plperl failure on OS X 10.5(.1)