postgresql/src/include/utils
Thomas Munro 1d257577e0 Optionally prefetch referenced data in recovery.
Introduce a new GUC recovery_prefetch, disabled by default.  When
enabled, look ahead in the WAL and try to initiate asynchronous reading
of referenced data blocks that are not yet cached in our buffer pool.
For now, this is done with posix_fadvise(), which has several caveats.
Better mechanisms will follow in later work on the I/O subsystem.

The GUC maintenance_io_concurrency is used to limit the number of
concurrent I/Os we allow ourselves to initiate, based on pessimistic
heuristics used to infer that I/Os have begun and completed.

The GUC wal_decode_buffer_size is used to limit the maximum distance we
are prepared to read ahead in the WAL to find uncached blocks.

Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com> (parts)
Reviewed-by: Andres Freund <andres@anarazel.de> (parts)
Reviewed-by: Tomas Vondra <tomas.vondra@2ndquadrant.com> (parts)
Tested-by: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Tested-by: Jakub Wartak <Jakub.Wartak@tomtom.com>
Tested-by: Dmitry Dolgov <9erthalion6@gmail.com>
Tested-by: Sait Talha Nisanci <Sait.Nisanci@microsoft.com>
Discussion: https://postgr.es/m/CA%2BhUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq%3DAovOddfHpA%40mail.gmail.com
2021-04-08 23:20:42 +12:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Fix has_column_privilege function corner case 2021-03-31 13:55:25 -04:00
aclchk_internal.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
array.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
arrayaccess.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
ascii.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
attoptcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
backend_progress.h Split backend status and progress related functionality out of pgstat.c. 2021-04-03 11:42:52 -07:00
backend_status.h Make use of in-core query id added by commit 5fd9dfa5f5 2021-04-07 14:04:06 -04:00
builtins.h Rework refactoring of hex and encoding routines 2021-01-14 11:13:24 +09:00
bytea.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
combocid.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
date.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
datetime.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
datum.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
dsa.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
dynahash.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
elog.h Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00
evtcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
expandeddatum.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
expandedrecord.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
float.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
fmgrtab.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
formatting.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
freepage.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
geo_decls.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
guc.h Optionally prefetch referenced data in recovery. 2021-04-08 23:20:42 +12:00
guc_tables.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
help_config.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
hsearch.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
index_selfuncs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
inet.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
int8.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
inval.h Replace CLOBBER_CACHE_ALWAYS with run-time GUC 2021-01-06 10:46:44 +01:00
json.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonb.h Implementation of subscripting for jsonb 2021-01-31 23:50:40 +03:00
jsonfuncs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonpath.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
logtape.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
lsyscache.h Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY 2021-02-10 13:06:48 +09:00
memdebug.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
memutils.h Add function to log the memory contexts of specified backend process. 2021-04-06 13:44:15 +09:00
multirangetypes.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
numeric.h Change return type of EXTRACT to numeric 2021-04-06 07:20:42 +02:00
old_snapshot.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
palloc.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
partcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_crc.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_locale.h Hide internal error for pg_collation_actual_version(<bad OID>). 2021-02-22 23:01:20 +13:00
pg_lsn.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_rusage.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pidfile.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
plancache.h Improve performance of repeated CALLs within plpgsql procedures. 2021-01-25 22:28:29 -05:00
portal.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
ps_status.h Refactor ps_status.c API 2020-03-11 16:38:31 +01:00
queryenvironment.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
queryjumble.h Move pg_stat_statements query jumbling to core. 2021-04-07 13:06:56 -04:00
rangetypes.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
regproc.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
rel.h Revert "Enable parallel SELECT for "INSERT INTO ... SELECT ..."." 2021-03-24 11:29:15 +05:30
relcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
relfilenodemap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
relmapper.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
relptr.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
reltrigger.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
resowner.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
resowner_private.h Refactor HMAC implementations 2021-04-03 17:30:49 +09:00
rls.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
ruleutils.h Extended statistics on expressions 2021-03-27 00:01:11 +01:00
sampling.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
selfuncs.h Allow estimate_num_groups() to pass back further details about the estimation 2021-03-30 20:52:46 +13:00
sharedtuplestore.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
snapmgr.h ALTER TABLE ... DETACH PARTITION ... CONCURRENTLY 2021-03-25 18:00:28 -03:00
snapshot.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
sortsupport.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
spccache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
syscache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
timeout.h Detect POLLHUP/POLLRDHUP while running queries. 2021-04-03 09:02:41 +13:00
timestamp.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tuplesort.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tuplestore.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
typcache.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tzparser.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
uuid.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
varbit.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
varlena.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
wait_event.h Add functions to wait for backend termination 2021-04-08 11:40:54 +02:00
xid8.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
xml.h Update copyright for 2021 2021-01-02 13:06:25 -05:00