Mitu Verma <mitu.verma@ericsson.com> writes:
> I am running a single query at this moment.
> INSERT INTO eventLogEntry (object, method, bgwUser, time, realUser, host, application, tableIndex ) VALUES
(E'Server',E'Start', E'bgw', E'20140512122404', NULL, NULL, NULL, 539 );
> So not able to understand whats wrong with the database that it is unable to process this simple insert query.
> At the same time if drop the index and recreate the table then this issue is resolved. But obviously this is not a
feasiblesolution in live environment. Plz see if you can provide some help.
>> pstack 16950
> #0 0x00000000006dc1da in hash_search ()
> #1 0x000000000060e430 in LockAcquireExtended ()
> #2 0x000000000060c46e in XactLockTableWait ()
> #3 0x0000000000476bc6 in _bt_doinsert ()
> #4 0x0000000000479882 in btinsert ()
It'd appear that the INSERT is blocked because it's waiting to see if some
other transaction that has inserted a conflicting key value into a unique
index will commit or not. You could probably learn more about what's
going on by looking into pg_locks and pg_stat_activity. But at this point
I see no reason whatsoever to think there's a Postgres bug involved.
regards, tom lane