From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding |
Date: | 2021-01-10 09:43:48 |
Message-ID: | 20210110094348.GA227177@rfd.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jan 10, 2021 at 11:44:14AM +0500, Andrey Borodin wrote:
> > 10 янв. 2021 г., в 03:15, Noah Misch <noah(at)leadboat(dot)com> написал(а):
> >
> > No; it deletes the most recent ~1B and leaves the older segments. An
> > exception is multixact, as described in the commit message and the patch's
> > change to a comment in TruncateMultiXact().
>
> Thanks for clarification.
> One more thing: retention point at 3/4 of overall space (half of wraparound) seems more or less random to me. Why not 5/8 or 9/16?
No reason for that exact value. The purpose of that patch is to mitigate bugs
that cause the server to write data into a region of the SLRU that we permit
truncation to unlink. If the patch instead tested "diff > INT_MIN * .99", the
new behavior would get little testing, because xidWarnLimit would start first.
Also, the new behavior wouldn't mitigate bugs that trespass >~20M XIDs into
unlink-eligible space. If the patch tested "diff > INT_MIN * .01", more sites
would see disk consumption grow. I think reasonable multipliers range from
0.5 (in the patch today) to 0.9, but it's a judgment call.
> Can you please send revised patches with fixes?
Attached.
Attachment | Content-Type | Size |
---|---|---|
slru-truncate-modulo-v6.patch | text/plain | 27.9 KB |
slru-truncate-t-insurance-v5.patch | text/plain | 39.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-01-10 09:58:58 | Re: Added schema level support for publication. |
Previous Message | Andrey Borodin | 2021-01-10 06:44:14 | Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding |