Re: shared memory/max_locks_per_transaction error - Mailing list pgsql-general

From Tom Lane
Subject Re: shared memory/max_locks_per_transaction error
Date
Msg-id 9485.1205765730@sss.pgh.pa.us
Whole thread Raw
In response to Re: shared memory/max_locks_per_transaction error  ("Kynn Jones" <kynnjo@gmail.com>)
Responses Re: shared memory/max_locks_per_transaction error  (Erik Jones <erik@myemma.com>)
Re: shared memory/max_locks_per_transaction error  ("Kynn Jones" <kynnjo@gmail.com>)
List pgsql-general
"Kynn Jones" <kynnjo@gmail.com> writes:
> I'm leaning towards the re-design option, primarily because I really don't
> really understand the consequences of cranking up max_locks_per_transaction.
>  E.g. Why is its default value 2^6, instead of, say, 2^15?  In fact, why is
> there a ceiling on the number of locks at all?

Because the size of the lock table in shared memory has to be set at
postmaster start.

There are people running DBs with a couple hundred thousand tables,
but I don't know what sorts of performance problems they face when
they try to run pg_dump.  I think most SQL experts would suggest
a redesign: if you have lots of essentially identical tables the
standard advice is to fold them all into one table with one more
key column.

            regards, tom lane

pgsql-general by date:

Previous
From: "Kynn Jones"
Date:
Subject: Re: shared memory/max_locks_per_transaction error
Next
From: "Gauthier, Dave"
Date:
Subject: Catch-22