projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b706172
)
C comment: mention why no setting lasterrno in dir_existsfile()
author
Bruce Momjian
<
[email protected]
>
Tue, 31 Oct 2023 15:59:14 +0000
(11:59 -0400)
committer
Bruce Momjian
<
[email protected]
>
Tue, 31 Oct 2023 15:59:14 +0000
(11:59 -0400)
Reported-by: Wei Sun
Discussion: https://postgr.es/m/
[email protected]
Backpatch-through: master
src/bin/pg_basebackup/walmethods.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_basebackup/walmethods.c
b/src/bin/pg_basebackup/walmethods.c
index 2de11ce9b1c45c8ab4db15855a25eea03e01ac87..33cb85b849ea3f4efb2b1625daaff523d0aa0b0f 100644
(file)
--- a/
src/bin/pg_basebackup/walmethods.c
+++ b/
src/bin/pg_basebackup/walmethods.c
@@
-594,6
+594,11
@@
dir_existsfile(WalWriteMethod *wwmethod, const char *pathname)
fd = open(tmppath, O_RDONLY | PG_BINARY, 0);
if (fd < 0)
+
+ /*
+ * Skip setting dir_data->lasterrno here because we are only checking
+ * for existence.
+ */
return false;
close(fd);
return true;