Re: Query cancellation on hot standby because of buffer pins - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Query cancellation on hot standby because of buffer pins
Date
Msg-id 1328517318.859752.1424472489522.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Query cancellation on hot standby because of buffer pins  (Drazen Kacar <drazen.kacar@oradian.com>)
Responses Re: Query cancellation on hot standby because of buffer pins
List pgsql-admin
Drazen Kacar <drazen.kacar@oradian.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


pgsql-admin by date:

Previous
From: Drazen Kacar
Date:
Subject: Query cancellation on hot standby because of buffer pins
Next
From: Josef Springer
Date:
Subject: How can i keep my databases when installing PostgreSQL ?