False "pg_serial": apparent wraparound” in logs - Mailing list pgsql-hackers

From Imseih (AWS), Sami
Subject False "pg_serial": apparent wraparound” in logs
Date
Msg-id 755E19CA-D02C-4A4C-80D3-74F775410C48@amazon.com
Whole thread Raw
Responses Re: False "pg_serial": apparent wraparound” in logs
List pgsql-hackers

Hi,

 

I Recently encountered a situation on the field in which the message

“could not truncate directory "pg_serial": apparent wraparound”

was logged even through there was no danger of wraparound. This

was on a brand new cluster and only took a few minutes to see

the message in the logs.

 

Reading on some history of this error message, it appears that there

was work done to improve SLRU truncation and associated wraparound

log messages [1]. The attached repro on master still shows that this message

can be logged incorrectly.

 

The repro runs updates with 90 threads in serializable mode and kicks

off a “long running” select on the same table in serializable mode.

 

As soon as the long running select commits, the next checkpoint fails

to truncate the SLRU and logs the error message.

 

Besides the confusing log message, there may also also be risk with

pg_serial getting unnecessarily bloated and depleting the disk space.

 

Is this a bug?

 

[1] https://www.postgresql.org/message-id/flat/20190202083822.GC32531%40gust.leadboat.com

 

Regards,

 

Sami Imseih

Amazon Web Services (AWS)

 

 

 

 

 

Attachment

pgsql-hackers by date:

Previous
From: Masahiro Ikeda
Date:
Subject: Re: Make --help output fit within 80 columns per line
Next
From: Andres Freund
Date:
Subject: Re: initdb caching during tests