On Wed, Oct 17, 2012 at 7:18 AM, Tom Lane <tgl@xxxxxxxxxxxxx> 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)? -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance