aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeFunctionscan.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-07-15 15:17:32 +0900
committerMichael Paquier <michael@paquier.xyz>2020-07-15 15:17:32 +0900
commit5f89bb4cf0109bdb36eb8f78943f5b0f141c614a (patch)
treecb13343c78ad093bfc5839e4ee44efaabd6743b1 /src/backend/executor/nodeFunctionscan.c
parente38705b5c7635644a70cf7c9eadb7a90bb8ea13b (diff)
downloadpostgresql-5f89bb4cf0109bdb36eb8f78943f5b0f141c614a.tar.gz
postgresql-5f89bb4cf0109bdb36eb8f78943f5b0f141c614a.zip
Fix handling of missing files when using pg_rewind with online source
When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it is listed in a directory and the moment its metadata is obtained with pg_stat_file() (say a recycled WAL segment). The query result was processed in such a way that for each tuple we checked only that the first file's metadata was NULL. This could have two consequences, both resulting in a failure of the rewind: - If the first tuple referred to a removed file, all files from the source would be ignored. - Any file actually missing would not be considered as such. While on it, rework slightly the code so as no values are saved if we know that a file is going to be skipped. Issue introduced by b36805f, so backpatch down to 9.5. Author: Justin Pryzby, Michael Paquier Reviewed-by: Daniel Gustafsson, Masahiko Sawada Discussion: https://postgr.es/m/20200713061010.GC23581@telsasoft.com Backpatch-through: 9.5
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
0 files changed, 0 insertions, 0 deletions