X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6DBBA9DCC00 for ; Mon, 9 Jan 2006 05:13:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20903-01 for ; Mon, 9 Jan 2006 05:13:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 92DD59DC844 for ; Mon, 9 Jan 2006 05:13:49 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 495C433A69; Mon, 9 Jan 2006 10:13:50 +0100 (MET) From: vimal.gupta@gmail.com X-Newsgroups: pgsql.performance Subject: Hanging Query Date: 8 Jan 2006 09:34:30 -0800 Organization: http://groups.google.com Lines: 22 Message-ID: <1136741670.479720.284080@f14g2000cwb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=219.65.218.137; posting-account=YZ-Tcw0AAAAxiPQWFqzp1c3H22tl8g8e To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.431 required=5 tests=[DATE_IN_PAST_12_24=0.881, NO_REAL_NAME=0.55] X-Spam-Score: 1.431 X-Spam-Level: * X-Archive-Number: 200601/177 X-Sequence-Number: 16655 We have to inserts a records(15000- 20000) into a table which also contains (15000-20000) records, then after insertion, we have to delete the records according to a business rule. Above process is taking place in a transaction and we are using batches of 128 to insert records. Everything works fine on QA environment but somehow after inserts, delete query hangs in production environment. Delete query has some joins with other table and a self join. There is no exception as we have done enough exception handling. It simply hangs with no trace in application logs. When I do "ps aux" , I see postgres 5294 41.3 2.4 270120 38092 pts/4 R 10:41 52:56 postgres: nuuser nm 127.0.0.1 DELETE Postgres 7.3.4 on Linux.. Thanks for any help.. Vimal