Long running DDL statements blocking all queries

From: Ashu Pachauri <ashu210890(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Long running DDL statements blocking all queries
Date: 2018-05-31 10:38:29
Message-ID: CA+C_EDi67daRmVAKVEdh1CP0EUL6deLV-ON4nB5rst1WNx6w6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We have been using Postgres 9.5.12 behind PGBouncer and facing some weird
issues. Whenever we running long running DDL statements (e.g. 'add index
concurently' or 'Alter table alter column type'), after some time, we start
seeing that almost every query in our application starts getting blocked.
I understand that the operations I mentioned cab be unsafe, but the queries
being blocked are on completely unrelated tables. I used the instructions
given on Postgres wiki (https://wiki.postgresql.org/wiki/Lock_Monitoring)
to correlate the blocking and blocked statements and there seems to be
absolutely no correlation.

Thanks,
Ashu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fabio Pardi 2018-05-31 11:08:44 Re: Long running DDL statements blocking all queries
Previous Message Nicolas Seinlet 2018-05-31 09:09:38 Sort is generating rows