Re: Out of shared mem on new box with more mem, 9.1.5 -> 9.1.6

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Out of shared mem on new box with more mem, 9.1.5 -> 9.1.6
Date: 2012-10-17 15:09:11
Message-ID: CAOtHd0BNX7+7-kib9b4jyOCD6=V6tWmn0FSNdy7L0uDXwL5KbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Oct 17, 2012 at 7:18 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> ERROR: out of shared memory
>> HINT: You might need to increase max_pred_locks_per_transaction.
>
> This has nothing to do with work_mem nor maintenance_work_mem; rather,
> it means you're running out of space in the database-wide lock table.
> You need to take the hint's advice.

Sure, just trying to understand why this happened in the first place.

> The query in itself doesn't seem very exceptional. I wonder whether
> you recently switched your application to use serializable mode?

The change (for some transactions) was relatively recent, but predated
the switch to the replica by several days. Before the switch,
everything was running fine.

> But
> anyway, a query's demand for predicate locks can depend on a lot of
> not-very-visible factors, such as how many physical pages the tuples
> it accesses are spread across. I don't find it too hard to credit
> that yesterday you were just under the limit and today you're just
> over even though "nothing changed".

Interesting, thanks for the input. So it could be just a coincidence
that the errors occurred in lock-step with the promotion? Or does a
replica have a different (or different enough) physical layout that
this could have been a factor (my understanding of replication is
relatively high level--read: vague)?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrea Suisani 2012-10-17 15:45:23 Re: Two identical systems, radically different performance
Previous Message Tom Lane 2012-10-17 14:18:46 Re: Out of shared mem on new box with more mem, 9.1.5 -> 9.1.6