Re: shared memory/max_locks_per_transaction error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: shared memory/max_locks_per_transaction error
Дата
Msg-id 27493.1205536331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на shared memory/max_locks_per_transaction error  ("Kynn Jones" <kynnjo@gmail.com>)
Ответы Re: shared memory/max_locks_per_transaction error  ("Kynn Jones" <kynnjo@gmail.com>)
Список pgsql-general
"Kynn Jones" <kynnjo@gmail.com> writes:
> Initially I didn't know what our max_locks_per_transaction was (nor even a
> typical value for it), but in light of the procedure's failure after 3500
> iterations, I figured that it was 3500 or so.  In fact ours is only 64 (the
> default), so I'm now thoroughly confused.

The number of lock slots available system-wide is
max_locks_per_transaction times max_connections, and your procedure was
chewing them all.  I suggest taking the hint's advice if you really need
to create 3500 tables in a single transaction.  Actually, you'd better
do it if you want to have 3500 tables at all, because pg_dump will
certainly try to acquire AccessShare lock on all of them.

> Is there a way to force the release of locks within the loop?

No.

            regards, tom lane

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

Предыдущее
От: Clodoaldo
Дата:
Сообщение: Re: Reindex does not finish 8.2.6
Следующее
От: Russell Smith
Дата:
Сообщение: Re: postgre vs MySQL