Re: Out of shared memory (locks per process) using table-inheritance style partitioning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Prevost" <j(dot)prevost(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of shared memory (locks per process) using table-inheritance style partitioning
Date: 2007-08-31 15:07:20
Message-ID: 24618.1188572840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"John Prevost" <j(dot)prevost(at)gmail(dot)com> writes:
>> So what's the problem? Increase max_locks_per_transaction. The reason
>> we have that as a tunable is mainly to support systems with very large
>> numbers of tables.

> So increasing this value into the thousands is a reasonable approach?
> If it is reasonable, that's fine. I'll certainly be increasing it
> somewhat in any case.

> It just feels more than a little extreme to be tweaking a parameter
> which has the comment "32 has historically been enough" up by a factor
> of 300 or more=97extreme enough to make me wonder if there shouldn't be
> some other solution for partitioning.

Unless you expect all of your sessions to be touching all of the tables,
you probably don't need to be so extreme as that. The parameter is a
bit misnamed, as it is not a hard limit per-session. The total number
of locks allowed in the system is max_locks_per_transaction times
max_connections, but we don't limit any one process to any particular
fraction of that.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Decibel! 2007-08-31 15:49:08 Re: [GENERAL] Undetected corruption of table files
Previous Message Michael Glaesemann 2007-08-31 14:52:56 Re: E_BAD_ACCESS with palloc/pfree in base type