From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Shrikant Bhende <shrikantpostgresql@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Alter command getting stuck on a table
Date: Tue, 07 Jan 2020 07:44:34 -0500
Message-ID: <4965.1578401074@sss.pgh.pa.us> (raw)
In-Reply-To: <70527e5e5ca140cd0950c1e8c63e19221a207ddc.camel@cybertec.at>
References: <CAMTQpJALSF2EvBqmdYCqKnXx-o2VQZ4+KRn1TsstudQukC0Ryg@mail.gmail.com>
<70527e5e5ca140cd0950c1e8c63e19221a207ddc.camel@cybertec.at>
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Tue, 2020-01-07 at 14:58 +0530, Shrikant Bhende wrote:
>> I am trying to add a column to a table but it's not working, I have also tried
>> reindex and drop on the same table but those commands are also getting stuck.
> There is a concurrent session which has an open transaction which
> holds some lock on the table in question.
Yes, that looks like the cause. The pg_locks view could help you
find the culprit session.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, shrikantpostgresql@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Alter command getting stuck on a table
In-Reply-To: <4965.1578401074@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox