Re: FW: [postgres-discuss] Insert query hangs - Mailing list pgsql-hackers

From Robert Haas
Subject Re: FW: [postgres-discuss] Insert query hangs
Date
Msg-id CA+TgmoZet6=UMLZAByrtU5GW5ckEUP2QZZTJxKM_QH6zF7wGVw@mail.gmail.com
Whole thread Raw
In response to FW: [postgres-discuss] Insert query hangs  (M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>)
List pgsql-hackers
On Wed, Jul 9, 2014 at 9:23 AM, M Tarkeshwar Rao
<m.tarkeshwar.rao@ericsson.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Pg_upgrade and toast tables bug discovered
Next
From: Greg Stark
Date:
Subject: Re: wrapping in extended mode doesn't work well with default pager