Thread: Is this a bug?

Is this a bug?

From
Tatsuo Ishii
Date:
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


Re: Is this a bug?

From
Sergei Kornilov
Date:
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,
whetheror not the data to be removed is visible.
 
this is your case

regards, Sergei


Re: Is this a bug?

From
Robert Haas
Date:
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


Re: Is this a bug?

From
Andres Freund
Date:
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


Re: Is this a bug?

From
Tatsuo Ishii
Date:
>> "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