Re: Higher chance of deadlock due to ANALYZE VERBOSE / SHARE UPDATE EXCLUSIVE? - Mailing list pgsql-general

From Tom Lane
Subject Re: Higher chance of deadlock due to ANALYZE VERBOSE / SHARE UPDATE EXCLUSIVE?
Date
Msg-id 1192.1411432705@sss.pgh.pa.us
Whole thread Raw
In response to Higher chance of deadlock due to ANALYZE VERBOSE / SHARE UPDATE EXCLUSIVE?  (Dean Toader <deant@mirthcorp.com>)
List pgsql-general
Dean Toader <deant@mirthcorp.com> writes:
> Can anyone see an increased possibility of deadlock occurring with
> ANALYZE VERBOSE (initiated by �vacuumdb -a --analyze-only --verbose -U postgres�
> command run once every 24 hrs on a cronjob schedule), VACUUM (initiated by autovacuum)
> and say ... a long running UPDATE (initiated by a JEE application)
> all happening concurrently on the same table?

If an autovacuum is part of a deadlock, the deadlock detector should
preferentially kill the autovacuum transaction.  Is that not happening
for you?  But in any case, whether that happens or not, SHARE UPDATE
EXCLUSIVE doesn't block UPDATE commands, so that the case you describe
above is not a deadlock.  You would have to be doing some kind of DDL
on the table in question to have any risk.

            regards, tom lane


pgsql-general by date:

Previous
From: Dean Toader
Date:
Subject: Higher chance of deadlock due to ANALYZE VERBOSE / SHARE UPDATE EXCLUSIVE?
Next
From: Xiang Gan
Date:
Subject: Re: Installing Postgresql on Linux Friendlyarm