From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | bakkiya <bakkiya(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Postgres problem with partition queries |
Date: | 2010-12-01 14:35:06 |
Message-ID: | 15222.1291214106@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
bakkiya <bakkiya(at)gmail(dot)com> writes:
> 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.
> [ and it blocks ]
This is hardly surprising. A query on the inheritance tree has to
take AccessShare lock on every member table, because it has to inspect
each table to determine whether it should scan it. So it's going to
conflict with the exclusive lock needed to drop one of the tables.
That means first that the DROP gets blocked by a pre-existing query,
and second that the waiting DROP also blocks other queries of the same
kind.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-12-01 15:54:11 | Re: Best Linux filesystem for Postgres data store ? |
Previous Message | bakkiya | 2010-12-01 05:51:17 | Postgres problem with partition queries |