From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Devendra Yadav <devendra(dot)857(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: |
Date: | 2021-03-30 13:41:43 |
Message-ID: | 2800078.1617111703@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Devendra Yadav <devendra(dot)857(at)gmail(dot)com> writes:
> We are running on PostgreSQL v 12.1 , Redhat 7.8.
> We are running a query - ALTER TABLE mytable ADD COLUMN deposited DOUBLE
> PRECISION;
> This query is blocked by pid 0. It's not a postgres PID and won't allow to
> terminate from postgres.
It would be better if you showed the evidence that makes you think this,
as it's fairly likely that the true problem is somewhere else than
you think.
At a guess, however, a pg_locks display that suggests a lock is held
by "pid 0" might be trying to represent a lock held by a prepared-but-
uncommitted transaction. Try looking into the pg_prepared_xacts view.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Hotmail | 2021-03-30 18:22:02 | Performance bottleneck. High active sessions but postmaster kernel threads are in a sleep state, low CPU utilization |
Previous Message | Devendra Yadav | 2021-03-30 11:47:11 | Re: ALTER TABLE ADD COLUMN takes forever |