Greetings, It'd be nice to have a NOTICE printed when a wait-on-lock takes longer than a few seconds. It doesn't need to be precise and it doesn't have to be repeated over and over, just once. Perhaps even controlled by a GUC, though NOTICEs are generally ignored by non-interactive applications anyway, I believe.
I'd say if the lock hasn't been aquired after 5 seconds, print something like: NOTICE: Waiting on lock If it's available easily we might also list the type of lock, the OID, the table name, whatever, and perhaps the PID of whomever has the lock currently. It's just very frustrating to kick off something you expect to run for a while and come back quite a long time later to discover that it was blocked because another transaction had a lock. This mainly happens to us when scripts do things like drop tables while someone else has a transaction which was using that table some time in the past and they havn't committed yet. Thanks, Stephen
signature.asc
Description: Digital signature