postgresql/src/include/access
Noah Misch 66087f7e92 Prevent excess SimpleLruTruncate() deletion.
Every core SLRU wraps around.  With the exception of pg_notify, the wrap
point can fall in the middle of a page.  Account for this in the
PagePrecedes callback specification and in SimpleLruTruncate()'s use of
said callback.  Update each callback implementation to fit the new
specification.  This changes SerialPagePrecedesLogically() from the
style of asyncQueuePagePrecedes() to the style of CLOGPagePrecedes().
(Whereas pg_clog and pg_serial share a key space, pg_serial is nothing
like pg_notify.)  The bug fixed here has the same symptoms and user
followup steps as 592a589a04.  Back-patch
to 9.5 (all supported versions).

Reviewed by Andrey Borodin and (in earlier versions) by Tom Lane.

Discussion: https://postgr.es/m/20190202083822.GC32531@gust.leadboat.com
2021-01-16 12:21:39 -08:00
..
amapi.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
amvalidate.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
attnum.h Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
brin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
brin_internal.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_page.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
brin_pageops.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_revmap.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_tuple.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_xlog.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bufmask.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
clog.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
commit_ts.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
genam.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:49:07 +03:00
generic_xlog.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gin.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gin_private.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
ginblock.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ginxlog.h Generate less WAL during GiST, GIN and SP-GiST index build. 2019-04-03 17:03:15 +03:00
gist.h Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:25:22 +03:00
gist_private.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
gistscan.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gistxlog.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
hash.h Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
hash_xlog.h Compute XID horizon for page level index vacuum on primary. 2019-03-26 16:52:54 -07:00
heapam.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
heapam_xlog.h C comment: remove mention of use of t_hoff WAL structure member 2020-08-31 17:51:31 -04:00
hio.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
htup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
htup_details.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
itup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
multixact.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
nbtree.h Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
nbtxlog.h Fix nbtree page split rmgr desc routine. 2019-09-12 15:45:07 -07:00
parallel.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
printsimple.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
printtup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
relation.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
reloptions.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
relscan.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
rewriteheap.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sdir.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
session.h Fix typo. 2020-01-13 14:52:59 +05:30
skey.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
slru.h Prevent excess SimpleLruTruncate() deletion. 2021-01-16 12:21:39 -08:00
spgist.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
spgist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:49:07 +03:00
spgxlog.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
stratnum.h Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
subtrans.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sysattr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
table.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tableam.h Fix comments related to table AMs 2020-07-14 13:17:34 +09:00
timeline.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
transam.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tsmapi.h tableam: sample scan. 2019-03-31 18:37:57 -07:00
tupconvert.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tupdesc.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tupdesc_details.h Make naming of tupdesc related structs more consistent with the rest of PG. 2019-01-14 16:25:50 -08:00
tupmacs.h Improve comment for att_isnull. 2019-05-13 13:13:24 -04:00
tuptoaster.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
twophase.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
twophase_rmgr.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
valid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
visibilitymap.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xact.h doc: improve description of synchronous_commit modes 2020-10-15 15:15:29 -04:00
xlog.h Fix minor problems with non-exclusive backup cleanup. 2020-08-06 13:58:23 -04:00
xlog_internal.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogdefs.h Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
xloginsert.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogreader.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogrecord.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
xlogutils.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00