Is this a bug?

Started by Tatsuo Ishiialmost 8 years ago5 messages
#1Tatsuo Ishii
ishii@sraoss.co.jp

Today one of Pgpool-II users reported an interesting fatal error
message from PostgreSQL:

FATAL: terminating connection due to conflict with recovery
DETAIL: User was holding shared buffer pin for too long.
HINT: In a moment you should be able to reconnect to the database and repeat your command.

"User was holding shared buffer pin for too long" sounds unusual to
me. Is this a bug? PostgreSQL version is 10.1 according to the user.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

In reply to: Tatsuo Ishii (#1)
Re: Is this a bug?

Hello
No, this is not bug. https://www.postgresql.org/docs/10/static/hot-standby.html#HOT-STANDBY-CONFLICT
Message in DETAIL describe conflict reason.

Application of a vacuum cleanup record from WAL conflicts with queries accessing the target page on the standby, whether or not the data to be removed is visible.

this is your case

regards, Sergei

#3Robert Haas
robertmhaas@gmail.com
In reply to: Tatsuo Ishii (#1)
Re: Is this a bug?

On Wed, Feb 14, 2018 at 7:35 AM, Tatsuo Ishii <ishii@sraoss.co.jp> wrote:

Today one of Pgpool-II users reported an interesting fatal error
message from PostgreSQL:

FATAL: terminating connection due to conflict with recovery
DETAIL: User was holding shared buffer pin for too long.
HINT: In a moment you should be able to reconnect to the database and repeat your command.

"User was holding shared buffer pin for too long" sounds unusual to
me. Is this a bug? PostgreSQL version is 10.1 according to the user.

Sounds normal to me. Maybe the message could use some work, but this
is how hot standby works: if max_standby_archive_delay or
max_standby_streaming_delay expires, whatever is blocking recovery
gets blasted out of the way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#4Andres Freund
andres@anarazel.de
In reply to: Tatsuo Ishii (#1)
Re: Is this a bug?

Hi,

On 2018-02-14 21:35:00 +0900, Tatsuo Ishii wrote:

Today one of Pgpool-II users reported an interesting fatal error
message from PostgreSQL:

FATAL: terminating connection due to conflict with recovery
DETAIL: User was holding shared buffer pin for too long.
HINT: In a moment you should be able to reconnect to the database and repeat your command.

"User was holding shared buffer pin for too long" sounds unusual to
me. Is this a bug? PostgreSQL version is 10.1 according to the user.

Sorry to be the grumpy guy: This isn't the -general list. Nor -bugs. And
a quick search for it in the source code and/or search engines will show
some hits as well.

Greetings,

Andres Freund

#5Tatsuo Ishii
ishii@sraoss.co.jp
In reply to: Robert Haas (#3)
Re: Is this a bug?

"User was holding shared buffer pin for too long" sounds unusual to
me. Is this a bug? PostgreSQL version is 10.1 according to the user.

Sounds normal to me. Maybe the message could use some work, but this
is how hot standby works: if max_standby_archive_delay or
max_standby_streaming_delay expires, whatever is blocking recovery
gets blasted out of the way.

I didn't know that recovery conflict could happen even with buffer
pin. I should have examined the source code first. Sorry for noise.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp