Re: FW: [postgres-discuss] Insert query hangs

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FW: [postgres-discuss] Insert query hangs
Date: 2014-07-10 15:11:52
Message-ID: CA+TgmoZet6=UMLZAByrtU5GW5ckEUP2QZZTJxKM_QH6zF7wGVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 9, 2014 at 9:23 AM, M Tarkeshwar Rao
<m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com> wrote:
> I have the hang issue in Postgres, When I am going to insert into record in
> a table.
>
> Table structure is enclosed in the discussion.
>
> Also we found the issue with unique indexes. When I removed the unique index
> insert operation is working fine.
>
> I need help from this core group that weather this is the bug in the
> Postgres code or we are using unique index wrongly.

A hang of this type is usually caused by a lock conflict - some other
transaction in progress is blocking the insertion. You can
troubleshoot that by looking at pg_locks. But if that were the
explanation here, you would not have been able to drop the index.

As some of the posts you've quoted mention, it sounds like you may
have a corrupted table or index:

http://rhaas.blogspot.com/2012/03/why-is-my-database-corrupted.html
https://wiki.postgresql.org/wiki/Corruption

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-07-10 15:15:35 Re: wrapping in extended mode doesn't work well with default pager
Previous Message Robert Haas 2014-07-10 15:06:49 Re: LEFT JOINs not optimized away when not needed