Re: vacuum bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: vacuum bug
Date: 2003-07-01 15:13:45
Message-ID: 3259.1057072425@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> I was running a long-running vacuum full, and then halfway thru that our
> background vacuum process started. As well as this, there was light
> activity on a users table from which vacuum full was removing 90000 rows.

There would be *zero* activity on a table undergoing vacuum full, unless
your app has found a way around vacuum full's exclusive lock. You sure
this wasn't a plain vacuum?

> Then vacuum full failed after a while:
> ERROR: simple_heap_update: tuple concurrently updated

Were you doing VACUUM ANALYZEs?

It's possible for two concurrent VACUUM ANALYZEs of the same table
to get this failure from trying to concurrently update the same row in
pg_statistic. (The cure for this seems worse than the disease: AFAICS
you'd have to prevent *all* concurrent updates of pg_statistic by
grabbing a table-level lock. So we just live with one of the analyzes
reporting a failure. All the useful work gets done anyway, by one
transaction or the other.)

regards, tom lane

In response to

  • vacuum bug at 2003-07-01 07:44:41 from Christopher Kings-Lynne

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-07-01 15:14:04 Re: Urgent : Regarding Submission of Code
Previous Message Tom Lane 2003-07-01 15:00:56 Re: Index expressions: how to recreate