Re:

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re:
Дата
Msg-id 2800078.1617111703@sss.pgh.pa.us
обсуждение исходный текст
Ответ на  (Devendra Yadav <devendra.857@gmail.com>)
Список pgsql-admin
Devendra Yadav <devendra.857@gmail.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



В списке pgsql-admin по дате отправления:

Предыдущее
От: Devendra Yadav
Дата:
Сообщение: Re: ALTER TABLE ADD COLUMN takes forever
Следующее
От: Hotmail
Дата:
Сообщение: Performance bottleneck. High active sessions but postmaster kernel threads are in a sleep state, low CPU utilization