| От | Tom Lane |
|---|---|
| Тема | Re: a lot of session wait on lock relation |
| Дата | |
| Msg-id | 11465.1747315470@sss.pgh.pa.us обсуждение |
| Ответ на | a lot of session wait on lock relation (James Pang <jamespang886@gmail.com>) |
| Ответы |
Re: a lot of session wait on lock relation
|
| Список | pgsql-performance |
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Thu, 2025-05-15 at 16:27 +0800, James Pang wrote:
>> why inserts into partition table cause "relation lock" ?
> Something else does; use the pg_blocking_pids() function with the process ID of
> a blocked backend to find out who is holding the lock.
More specifically: the inserts are only trying to get a shared lock.
If they are blocked, it's because some other operation is already
holding an exclusive lock on the table and is not letting go.
Look for uncommitted DDL changes.
More details about that at [1].
regards, tom lane
[1] https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера