Re: Partitioned tables and locks

Поиск
Список
Период
Сортировка
От James Sewell
Тема Re: Partitioned tables and locks
Дата
Msg-id CAANVwEvXZ40q2yYYKmz1eXNKybK6s2yhOzhid4DbGma4HeEvkw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Partitioned tables and locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Partitioned tables and locks  (Michael Lewis <mlewis@entrata.com>)
Список 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?

Depends on the details of your query, and on which PG version you're
using, but it's by no means surprising for each child table to get
locked.  (I'm not sure where *two* locks would come from, though.)

The queries were just select count(*) both with a where clause which excludes some partitions and without, I’m on 11.

The table has over 3K partitions 


If you're working with massively partitioned tables, increasing
max_locks_per_transaction is a good idea.

It’s 256 at the moment, with 600 connections - guess I need more.
--
James Sewell,
Chief Architect

Suite 112, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009
P (+61) 2 8099 9000  W www.jirotech.com  F (+61) 2 8099 9099


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

Предыдущее
От: Steven Winfield
Дата:
Сообщение: RE: Row locks, SKIP LOCKED, and transactions
Следующее
От: James Sewell
Дата:
Сообщение: Re: Max locks