From: | Masahiko Sawada <msawada(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix assertion when decrementing eager scanning success and failu |
Date: | 2025-05-27 18:44:49 |
Message-ID: | E1uJzI8-000JeI-0Z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix assertion when decrementing eager scanning success and failure counters.
Previously, we asserted that the eager scan's success and failure
counters were positive before decrementing them. However, this
assumption was incorrect, as it's possible that some blocks have
already been eagerly scanned by the time eager scanning is disabled.
This commit replaces the assertions with guards to handle this
scenario gracefully.
With this change, we continue to allow read-ahead operations by the
read stream that exceed the success and failure caps. While there is a
possibility that overruns will trigger eager scans of additional
pages, this does not pose a practical concern as the overruns will not
be substantial and remain within an acceptable range.
Reviewed-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAD21AoConf6tkVCv-=JhQJj56kYsDwo4jG5+WqgT+ukSkYomSQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4c08ecd1618e3c5da664ba24a4aa7052772c4616
Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-05-27 20:57:06 | pgsql: Change pg_dump default for statistics export. |
Previous Message | Chris Gooch | 2025-05-27 16:13:07 | RE: [EXT] Re: GSS Auth issue when user member of lots of AD groups |