Re: query against pg_locks leads to large memory alloc
От | Tom Lane |
---|---|
Тема | Re: query against pg_locks leads to large memory alloc |
Дата | |
Msg-id | 12486.1408404273@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: query against pg_locks leads to large memory alloc (Kevin Grittner <kgrittn@ymail.com>) |
Ответы |
Re: query against pg_locks leads to large memory alloc
|
Список | pgsql-performance |
Kevin Grittner <kgrittn@ymail.com> writes: > Dave Owens <dave@teamunify.com> wrote: >> max_connections = 450 ...we have found that we run out of shared >> memory when max_pred_locks_per_transaction is less than 30k. > It gathers the information in memory to return for all those locks > (I think both the normal heavyweight locks and the predicate locks > do that).� 450 * 30000 is 13.5 million predicate locks you could > have, so they don't need a very big structure per lock to start > adding up.� I guess we should refactor that to use a tuplestore, so > it can spill to disk when it gets to be more than work_mem. Seems to me the bigger issue is why does he need such a huge max_pred_locks_per_transaction setting? It's hard to believe that performance wouldn't tank with 10 million predicate locks active. Whether you can do "select * from pg_locks" seems pretty far down the list of concerns about this setting. regards, tom lane
В списке pgsql-performance по дате отправления: