postgresql/src/backend/access
Fujii Masao 4bd0ad9e44 Prevent archive recovery from scanning non-existent WAL files.
Previously when there were multiple timelines listed in the history file
of the recovery target timeline, archive recovery searched all of them,
starting from the newest timeline to the oldest one, to find the segment
to read. That is, archive recovery had to continuously fail scanning
the segment until it reached the timeline that the segment belonged to.
These scans for non-existent segment could be harmful on the recovery
performance especially when archival area was located on the remote
storage and each scan could take a long time.

To address the issue, this commit changes archive recovery so that
it skips scanning the timeline that the segment to read doesn't belong to.

Author: Kyotaro Horiguchi, tweaked a bit by Fujii Masao
Reviewed-by: David Steele, Pavel Suderevsky, Grigory Smolkin
Discussion: https://postgr.es/m/16159-f5a34a3a04dc67e0@postgresql.org
Discussion: https://postgr.es/m/20200129.120222.1476610231001551715.horikyota.ntt@gmail.com
2020-04-08 00:49:29 +09:00
..
brin Implement operator class parameters 2020-03-30 19:17:23 +03:00
common Implement operator class parameters 2020-03-30 19:17:23 +03:00
gin Fix bugs in gin_fuzzy_search_limit processing. 2020-04-03 13:15:45 -04:00
gist Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
hash Add SQL type xid8 to expose FullTransactionId to users. 2020-04-07 12:03:59 +12:00
heap Allow autovacuum to log WAL usage statistics. 2020-04-06 16:24:51 +05:30
index Remove rudiments of supporting procnum == 0 from 911e702077 2020-03-30 23:43:25 +03:00
nbtree Fix nbtree kill_prior_tuple posting list assert. 2020-04-06 14:46:33 -07:00
rmgrdesc Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
spgist Fix missing SP-GiST support in 911e702077 2020-03-30 23:45:03 +03:00
table Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
tablesample Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
transam Prevent archive recovery from scanning non-existent WAL files. 2020-04-08 00:49:29 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00