postgresql/src/include/access
Thomas Munro dee663f784 Defer flushing of SLRU files.
Previously, we called fsync() after writing out individual pg_xact,
pg_multixact and pg_commit_ts pages due to cache pressure, leading to
regular I/O stalls in user backends and recovery.  Collapse requests for
the same file into a single system call as part of the next checkpoint,
as we already did for relation files, using the infrastructure developed
by commit 3eb77eba.  This can cause a significant improvement to
recovery performance, especially when it's otherwise CPU-bound.

Hoist ProcessSyncRequests() up into CheckPointGuts() to make it clearer
that it applies to all the SLRU mini-buffer-pools as well as the main
buffer pool.  Rearrange things so that data collected in CheckpointStats
includes SLRU activity.

Also remove the Shutdown{CLOG,CommitTS,SUBTRANS,MultiXact}() functions,
because they were redundant after the shutdown checkpoint that
immediately precedes them.  (I'm not sure if they were ever needed, but
they aren't now.)

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (parts)
Tested-by: Jakub Wartak <Jakub.Wartak@tomtom.com>
Discussion: https://postgr.es/m/CA+hUKGLJ=84YT+NvhkEEDAuUtVHMfQ9i-N7k_o50JmQ6Rpj_OQ@mail.gmail.com
2020-09-25 19:00:15 +12:00
..
amapi.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
amvalidate.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
attmap.h Fix assorted typos 2020-03-31 16:00:06 +02:00
attnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_internal.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
brin_page.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_pageops.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_revmap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_tuple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
bufmask.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
clog.h Defer flushing of SLRU files. 2020-09-25 19:00:15 +12:00
commit_ts.h Defer flushing of SLRU files. 2020-09-25 19:00:15 +12:00
detoast.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
genam.h Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
generic_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gin.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
gin_private.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
ginblock.h snapshot scalability: Don't compute global horizons while building snapshots. 2020-08-12 16:03:49 -07:00
ginxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gist.h Add support for building GiST index by sorting. 2020-09-17 11:33:40 +03:00
gist_private.h Add support for building GiST index by sorting. 2020-09-17 11:33:40 +03:00
gistscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gistxlog.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
hash.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
hash_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
heapam.h Add additional information in the vacuum error context. 2020-08-26 09:40:52 +05:30
heapam_xlog.h C comment: remove mention of use of t_hoff WAL structure member 2020-08-31 13:58:00 -04:00
heaptoast.h tableam: New callback relation_fetch_toast_slice. 2020-01-07 14:36:38 -05:00
hio.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
itup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
multixact.h Defer flushing of SLRU files. 2020-09-25 19:00:15 +12:00
nbtree.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
nbtxlog.h Adjust "root of to-be-deleted subtree" function. 2020-05-11 11:01:07 -07:00
parallel.h Allow vacuum command to process indexes in parallel. 2020-01-20 07:57:49 +05:30
printsimple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
printtup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relation.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reloptions.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
relscan.h Allocate consecutive blocks during parallel seqscans 2020-07-26 21:02:45 +12:00
rewriteheap.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Add deduplication to nbtree. 2020-02-26 13:05:30 -08:00
sdir.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
session.h Fix typo. 2020-01-13 14:44:55 +05:30
skey.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
slru.h Defer flushing of SLRU files. 2020-09-25 19:00:15 +12:00
spgist.h Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
spgist_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spgxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
stratnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
subtrans.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
syncscan.h Move syncscan.c to src/backend/access/common. 2020-07-29 16:59:33 +12:00
sysattr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
table.h Improve handling of dropped relations for REINDEX DATABASE/SCHEMA/SYSTEM 2020-09-02 09:08:12 +09:00
tableam.h Implement streaming mode in ReorderBuffer. 2020-08-08 07:47:06 +05:30
timeline.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
toast_helper.h Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
toast_internals.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
transam.h snapshot scalability: cache snapshots using a xact completion counter. 2020-08-17 21:08:30 -07:00
tsmapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupconvert.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupmacs.h Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
twophase.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
twophase_rmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
valid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
visibilitymap.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
xact.h Make xact.h usable in frontend. 2020-08-17 10:50:13 +03:00
xlog.h Remove non-fast promotion. 2020-07-29 21:24:26 +09:00
xlog_internal.h Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
xlogarchive.h Move routine definitions of xlogarchive.c to a new header file 2020-03-31 15:33:04 +09:00
xlogdefs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xloginsert.h Add support for building GiST index by sorting. 2020-09-17 11:33:40 +03:00
xlogreader.h Immediately WAL-log subtransaction and top-level XID association. 2020-07-20 08:48:26 +05:30
xlogrecord.h Immediately WAL-log subtransaction and top-level XID association. 2020-07-20 08:48:26 +05:30
xlogutils.h Adjust walsender usage of xlogreader, simplify APIs 2020-05-13 12:17:08 -04:00