pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Devendra Yadav <devendra.857@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re:
Date: Tue, 30 Mar 2021 09:41:43 -0400
Message-ID: <2800078.1617111703@sss.pgh.pa.us> (raw)
In-Reply-To: <CAE+tJY9xYh4EK==rGe9u9iD+z9kgDQhiQUhb4HRYDK6B5Y6TaQ@mail.gmail.com>
References: <CAE+tJY9xYh4EK==rGe9u9iD+z9kgDQhiQUhb4HRYDK6B5Y6TaQ@mail.gmail.com>

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





view thread (4+ messages)

Message-ID: <2800078.1617111703@sss.pgh.pa.us>
Permalink:  ../2800078.1617111703@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2800078.1617111703@sss.pgh.pa.us

 · 

reply

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, devendra.857@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re:
  In-Reply-To: <2800078.1617111703@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