Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

x4mmm@yandex-team.ru

From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2021-01-11T06:22:05Z
Lists: pgsql-hackers

> 10 янв. 2021 г., в 14:43, Noah Misch <noah@leadboat.com> написал(а):
> 
>> Can you please send revised patches with fixes?
> 
> Attached.
> <slru-truncate-modulo-v6.patch>
> <slru-truncate-t-insurance-v5.patch>

I'm marking patch as ready for committer.

I can't tell should we backpatch insurance patch or not: it potentially fixes unknown bugs, and potentially contains unknown bugs. I can't reason because of such uncertainty. I've tried to look for any potential problem and as for now I see none. Chances are <slru-truncate-t-insurance-v5.patch> is doing code less error-prone.

Fix <slru-truncate-modulo-v6.patch> certainly worth backpatching.

Thanks!

Best regards, Andrey Borodin.


Commits

  1. Prevent excess SimpleLruTruncate() deletion.

  2. Fix unlinking of SLRU segments.

  3. Defer flushing of SLRU files.

  4. Change XID and mxact limits to warn at 40M and stop at 3M.