Re: DROP OWNED BY fails with #53200: ERROR: out of shared memory

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: DROP OWNED BY fails with #53200: ERROR: out of shared memory
Дата
Msg-id 2208869.1641836366@sss.pgh.pa.us
обсуждение исходный текст
Ответ на DROP OWNED BY fails with #53200: ERROR: out of shared memory  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
Dominique Devienne <ddevienne@gmail.com> writes:
> I'm trying to DROP a ROLE that has 4 schemas:
> * 2 smallish ones (1 or 2 dozen tables each),
> * 2 largish ones (250 tables, totalling around 4000 columns each).

> And of course there are various indexes, constraints, etc... on each schema.

You're going to need a lock per dropped relation.  The number of
columns or rows doesn't enter into it, but the number of indexes does.

> DDL Error: DROP OWNED BY "Epos-PNS (a73e1fbdcc5b4460ba55703a0d6b6ad7)"
> CASCADE: #53200: ERROR:  out of shared memory
> HINT:  You might need to increase max_locks_per_transaction.

I'd not have expected that when dropping 500-or-so tables, but maybe
you have a lot of indexes per table?

> And please note that there could be dozens even hundreds of largish schemas
> associated to the dropped ROLE (2 + N), not just the 2+2 it fails with here.

There's not a lot of penalty to increasing max_locks_per_transaction,
but no you can't make it "unbounded".

            regards, tom lane



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

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: DROP OWNED BY fails with #53200: ERROR: out of shared memory
Следующее
От: Dominique Devienne
Дата:
Сообщение: Re: DROP OWNED BY fails with #53200: ERROR: out of shared memory