Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Dl7-00007J-Nx for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 18:35:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X4Dl5-0004Cv-Si for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 18:35:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X4Dl4-0004Bu-V6 for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 18:35:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X4Dkx-0000UY-Ca for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 18:35:21 +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 s67IZBCE028444; Mon, 7 Jul 2014 14:35:11 -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: <84BC7AB0D621A74893EC9C9E151293B003F8F5A0@ESESSMB207.ericsson.se> References: <20140707054645.2775.15941@wrigleys.postgresql.org> <22456.1404744850@sss.pgh.pa.us> <84BC7AB0D621A74893EC9C9E151293B003F8F581@ESESSMB207.ericsson.se> <26653.1404754025@sss.pgh.pa.us> <84BC7AB0D621A74893EC9C9E151293B003F8F5A0@ESESSMB207.ericsson.se> Comments: In-reply-to Mitu Verma message dated "Mon, 07 Jul 2014 17:34:14 -0000" Date: Mon, 07 Jul 2014 14:35:11 -0400 Message-ID: <28443.1404758111@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 not sure if it is a postgres issue or not, so need your help in that. Well, it looks like you've got two concurrent transactions trying to insert the exact same data: > 16384 | fm_db_CollectCCN | 20714 | 16391 | mmsuper | | ::1 | | 19540 > | 2014-07-07 19:10:09.295565+02 | 2014-07-07 19:10:09.311701+02 | 2014-07-07 19:10:09.311701+02 | f | INSERT INTO ev > entLogEntry (object, method, bgwUser, time, realUser, host, application, tableIndex ) VALUES (E'Server', E'Start', E'bgw' > , E'20140512122404', NULL, NULL, NULL, 539 ) > 16384 | fm_db_CollectCCN | 20819 | 16391 | mmsuper | | ::1 | | 19602 > | 2014-07-07 19:10:45.18688+02 | 2014-07-07 19:10:45.202903+02 | 2014-07-07 19:10:45.202903+02 | f | INSERT INTO ev > entLogEntry (object, method, bgwUser, time, realUser, host, application, tableIndex ) VALUES (E'Server', E'Start', E'bgw' > , E'20140512122404', NULL, NULL, NULL, 539 ) Presumably this is falling foul of a unique index on the table. The second one is going to block until the first one either commits or rolls back. 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