Re: Deadlock or other hang while vacuuming?

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

On Mon, Nov 08, 2004 at 08:06:02PM -0500, Tom Lane wrote:
> 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.

Well, that puts me back to one of my first theories, that I have an
effective deadlock due to the lack of a dedicated request processing
thread to handle the enumeration session requests. All the other
threads have blocked waiting to handle other types of requests.

I thought I had ruled it out from my reading that a read only cursor
wouldn't block a vacuum, but I guess I was wrong. Thanks, I'll implement
my work around.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-11-09 15:03:38 Re: ALTER USER SET log_* not allowed...
Previous Message Abaco informática s.a. 2004-11-09 12:37:41 Error in sql sintax