Skip site navigation (1) Skip section navigation (2)

Re: We need to log aborted autovacuums

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: We need to log aborted autovacuums
Date: 2011-01-15 16:14:12
Message-ID: 29022.1295108052@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Greg Smith <greg(at)2ndquadrant(dot)com> writes:
> Does try_relation_open need to have a lock acquisition timeout when AV 
> is calling it?

Hmm.  I think when looking at the AV code, I've always subconsciously
assumed that try_relation_open would fail immediately if it couldn't get
the lock.  That certainly seems like it would be a more appropriate way
to behave than delaying indefinitely.

In practice, the scenario you're worried about seems unlikely to persist
indefinitely: as soon as someone else comes along and blocks behind
autovacuum's request, the deadlock checker will kick AV off the lock
queue.  But it would probably be better not to depend on that.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-01-15 16:15:45
Subject: Re: log_hostname and pg_stat_activity
Previous:From: Tom LaneDate: 2011-01-15 16:08:48
Subject: Re: Add support for logging the current role

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group