Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 67D1A1337B9D for ; Wed, 1 Dec 2010 01:51:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 72464-05-5 for ; Wed, 1 Dec 2010 05:51:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mail.postgresql.org (Postfix) with ESMTP id C02BC1337BA2 for ; Wed, 1 Dec 2010 01:51:18 -0400 (AST) Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PNfb3-0008Iu-DM for pgsql-admin@postgresql.org; Tue, 30 Nov 2010 21:51:17 -0800 Date: Tue, 30 Nov 2010 21:51:17 -0800 (PST) From: bakkiya To: pgsql-admin@postgresql.org Message-ID: <1291182677403-3287234.post@n5.nabble.com> Subject: Postgres problem with partition queries MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.778 tagged_above=-10 required=5 tests=BAYES_00=-1.9, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201012/1 X-Sequence-Number: 36230 Hi All, We are having a partition table and we are querying some rows in the partition. select * from events where events.evt_time >= '2010-11-29 00:00:00' AND events.evt_time <= '2010-11-30 23:59:59' While this query is in running state, I am issuing a drop statement on a partition of this table. drop table events_p_20101207130000 Please note that the query is running on a different partition and drop is happening on a different partition. Now, in a different session, I am running a different query, select * from events where events.evt_time >= '2010-11-28 00:00:00' AND events.evt_time <= '2010-11-29 23:59:59' Now the issue is both the drop and my 2nd query is in waiting state and both these queries started running after my first queries completion. We have set constraint_exclusion to on and we used, select * from pg_stat_activity where waiting = 'true' query to check the status of the waiting queries. Now, can you please explain me on why it is behaving like this. Is this a postgres bug or any configuration needs to be done to avoid this waiting. Any help is really appreciated. Thanks, Bakki -- View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-problem-with-partition-queries-tp3287234p3287234.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com.