Re: Query cancellation on hot standby because of buffer pins

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Drazen Kacar <drazen(dot)kacar(at)oradian(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Query cancellation on hot standby because of buffer pins
Date: 2015-02-20 22:48:09
Message-ID: 1328517318.859752.1424472489522.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Drazen Kacar <drazen(dot)kacar(at)oradian(dot)com> wrote:

> I'm seeing query cancellation on hot standby (Postgres 9.3.4,
> configured with hot_standby_feedback=on) because of buffer pins
> being held for too long.
>
> Database message looks like this:
>
> ERROR: canceling statement due to conflict with recovery
> DETAIL: User was holding shared buffer pin for too long.
> STATEMENT: ...

It would be helpful to see what that statement was that you
replaced with the ellipsis.

I you don't already have log_autovacuum_min_duration set to 0 (or
something very close to it) on the primary, I recommend you set
that; it would be useful to see if this corresponds to a vacuum on
the table.

What is your maintenance_work_mem setting on the primary? Does
increasing it change the behavior? (You may want to jack that up
really high for diagnostic purposes.)

If you can associate the problem with a particular table, seeing
the definition of that table wouldn't hurt, either.

Oh, and please update to 9.3.6; there are some nasty bugs fixed.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Josef Springer 2015-02-22 10:08:37 How can i keep my databases when installing PostgreSQL ?
Previous Message Drazen Kacar 2015-02-20 08:18:23 Query cancellation on hot standby because of buffer pins