Partitioned tables and locks

Поиск
Список
Период
Сортировка
От James Sewell
Тема Partitioned tables and locks
Дата
Msg-id CAANVwEuOb+B9y2P7h0NruC-dAmf2p1xLJSjm5UMXwTBPAxtjvg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Partitioned tables and locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Is it expected that a lock on a partitioned table will take out 2 locks per child regardless of the number of children which are excluded at plan time?

For example I can select count(*) from a table with 3500 partitions in transaction, and see 7000 AccessShareLocks show up till I finish the transaction.

Bonus question - sometimes if I query pg_locks fast enough I can see ~30K locks - how could this possibly be the case. This is on an otherwise idle system.

Cheers,
James


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

В списке pgsql-general по дате отправления:

Предыдущее
От: Olivier Gautherot
Дата:
Сообщение: Re: READ UNCOMMITTED in postgres
Следующее
От: Andrey Borodin
Дата:
Сообщение: Commit to primary with unavailable sync standby