From: Mark Wong on
Tom Lane wrote:
> Mark Wong <markw(a)osdl.org> writes:
>> The number of transaction errors increased when I increased the
>> NUM_LOCK_PARTITIONS, which I think is the reason it failed to run when I
>> set it to 16.
>
> Hmm, what sort of errors are we talking about? I wonder if you've
> exposed a bug. Changing NUM_LOCK_PARTITIONS really shouldn't have any
> semantic effect.

The libpq client (error log:
http://dbt.osdl.org/dbt/dbt2dev/results/dev4-015/180/client/error.log)
is saying things like this:

ERROR: too many LWLocks taken
CONTEXT: SQL statement "DELETE FROM new_order
WHERE no_o_id = 2101
AND no_w_id = 349
AND no_d_id = 1"

A grep through that file shows that all the unexpected errors appear to
be due to "too many LWLocks taken".

Mark


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

From: Tom Lane on
Mark Wong <markw(a)osdl.org> writes:
> Tom Lane wrote:
>> Hmm, what sort of errors are we talking about?

> ERROR: too many LWLocks taken

That really shouldn't happen ... are you sure you did a full recompile
after changing NUM_LOCK_PARTITIONS?

Actually ... wait a moment. The default value of NUM_LOCK_PARTITIONS
is already 16 (1 << LOG2_NUM_LOCK_PARTITIONS where the latter is 4).
Are you saying you set LOG2_NUM_LOCK_PARTITIONS to 16? That would be
way too many partitions. I was thinking of testing
LOG2_NUM_LOCK_PARTITIONS in the range of about 2 to 5.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

From: Mark Wong on
Tom Lane wrote:
> Mark Wong <markw(a)osdl.org> writes:
>> Tom Lane wrote:
>>> Hmm, what sort of errors are we talking about?
>
>> ERROR: too many LWLocks taken
>
> That really shouldn't happen ... are you sure you did a full recompile
> after changing NUM_LOCK_PARTITIONS?
>
> Actually ... wait a moment. The default value of NUM_LOCK_PARTITIONS
> is already 16 (1 << LOG2_NUM_LOCK_PARTITIONS where the latter is 4).
> Are you saying you set LOG2_NUM_LOCK_PARTITIONS to 16? That would be
> way too many partitions. I was thinking of testing
> LOG2_NUM_LOCK_PARTITIONS in the range of about 2 to 5.

Oops, I can't read bit shifting. =p I'll do again.

Mark

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq