| От | Tom Lane |
|---|---|
| Тема | Re: truncate partitioned table locking |
| Дата | |
| Msg-id | 23091.1150766648@sss.pgh.pa.us обсуждение |
| Ответ на | Re: truncate partitioned table locking ("Sriram Dandapani" <sdandapani@counterpane.com>) |
| Список | pgsql-admin |
"Sriram Dandapani" <sdandapani@counterpane.com> writes:
> How can I issue a truncate /drop table on the child without running into
> locking issues. Doesn't constraint exclusion prevent access of a child
> table based on the check constraint criteria
No, because the planner has to access the child table in order to
examine its constraints. (Since TRUNCATE is a metadata update, the
fact that the constraints are metadata not content doesn't help.)
TRUNCATE in itself is fast enough that you shouldn't really have any
problems here. If you are having locking issues then I suspect you need
to look for transactions that are sitting on ordinary reader or writer
locks of the table, instead of doing their jobs and committing.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера