Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Ch7-0004WQ-Jz for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 17:27:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X4Ch6-0000gq-Td for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 17:27:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X4Ch6-0000gk-8g for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 17:27:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X4Ch3-0007Hu-G8 for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 17:27:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s67HR5Lv026654; Mon, 7 Jul 2014 13:27:05 -0400 From: Tom Lane To: Mitu Verma cc: "pgsql-bugs@postgresql.org" Subject: Re: BUG #10888: application is getting hanged in the poll() function of libpq.so. In-reply-to: <84BC7AB0D621A74893EC9C9E151293B003F8F581@ESESSMB207.ericsson.se> References: <20140707054645.2775.15941@wrigleys.postgresql.org> <22456.1404744850@sss.pgh.pa.us> <84BC7AB0D621A74893EC9C9E151293B003F8F581@ESESSMB207.ericsson.se> Comments: In-reply-to Mitu Verma message dated "Mon, 07 Jul 2014 17:18:23 -0000" Date: Mon, 07 Jul 2014 13:27:05 -0400 Message-ID: <26653.1404754025@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Mitu Verma 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 feasible solution 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs