Re: autovacuum next steps, take 2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: autovacuum next steps, take 2
Date
Msg-id 9972.1172545523@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum next steps, take 2  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-hackers
[ oh, I forgot to respond to this: ]

"Jim C. Nasby" <jim@nasby.net> writes:
> Isn't there a special lock acquired on a relation by vacuum? Can't we
> just check for that?

I think you're thinking that ConditionalLockRelation solves the problem,
but it does not, because it will fail if someone has taken a (quasi)
exclusive lock unrelated to vacuuming.  You don't want an application
that frequently takes short-term ExclusiveLocks on a table to thereby
cause autovacuum to frequently skip that table.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: autovacuum next steps, take 2
Next
From: Alvaro Herrera
Date:
Subject: Re: autovacuum next steps, take 2