Re: Postgres problem with partition queries

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: bakkiya
Дата:
Сообщение: Postgres problem with partition queries
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Best Linux filesystem for Postgres data store ?