Re: Deadlock or other hang while vacuuming?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ruff <cruff(at)ucar(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Deadlock or other hang while vacuuming?
Date: 2004-11-09 01:06:02
Message-ID: 12899.1099962362@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Craig Ruff <cruff(at)ucar(dot)edu> writes:
> I have an annoying problem with some kind of a hang or deadlock triggered
> sometimes when running a vacuum on a table with a pair of read only
> cursors enumerating different subsets of rows of the same table.

I believe that if VACUUM wants to delete a tuple that is on the same
physical page that a cursor is currently stopped on, the vacuum has to
wait until the cursor moves off that page. So the vacuum could
definitely be blocked by the cursor if the application is slow about
advancing the cursor. This isn't a deadlock though, unless the
application is also waiting for the vacuum to finish.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Prabhu Ram Prasath V 2004-11-09 05:52:30 Bug in Installation
Previous Message Gaetano Mendola 2004-11-08 21:44:37 Re: Possible bug: pg_hba.conf file