On 2018-Nov-06, Ron wrote: > On 11/06/2018 05:34 AM, Alvaro Herrera wrote: > I did see it, but the https://wiki.postgresql.org/wiki/Lock_Monitoring query > seems to work (seeing that it regularly shows locks). > > Is this query from https://stackoverflow.com/a/43363536/1543618 adequate to > the task? > > |selectpid,usename,pg_blocking_pids(pid)asblocked_by,query asblocked_query > frompg_stat_activity wherecardinality(pg_blocking_pids(pid))>0;| Seems a bit short on details ... I would add the queries being run by those other PIDs, just to understand what might be going on. Now, if that query returns empty when the CREATE is blocked, then this may be a red herring. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services