| От | Tom Lane |
|---|---|
| Тема | Re: Postgres problem with partition queries |
| Дата | |
| Msg-id | 15222.1291214106@sss.pgh.pa.us обсуждение |
| Ответ на | Postgres problem with partition queries (bakkiya <bakkiya@gmail.com>) |
| Список | pgsql-admin |
bakkiya <bakkiya@gmail.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
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера