On Thu, Oct 13, 2016 at 6:33 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: > If we agree that above is a problematic case, then some of the options > to solve it could be (a) Vacuum should not wait for a cleanup lock and > instead just give up and start again which I think is a bad idea (b) > don't allow to take lock of higher granularity after the scan is > suspended, not sure if that is feasible (c) document the above danger, > this sounds okay on the ground that nobody has reported the problem > till now
I don't think any of these sound particularly good. There have been some previous discussions of this topic. https://wiki.postgresql.org/wiki/Todo#Locking - second and third items https://www.postgresql.org/message-id/CA+TgmoZG01uGL2TV6KOjmax-53eT3J66nk1KSkuOsPysz=d...@mail.gmail.com https://www.postgresql.org/message-id/flat/CA%2BU5nMJde1%2Bh5bKm48%2B_4U%3D78%2Bw%2BRa4ipfJnAva6QVyDWv0VNQ%40mail.gmail.com https://www.postgresql.org/message-id/1223.1298392...@sss.pgh.pa.us I thought Tom had at some point suggested a way of detecting deadlocks of this type, but I can't find any such email now. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers