Remove useless lstat() call in pg_rewind.
This is duplicative of an lstat that was just done by the calling
function (traverse_datadir), besides which we weren't really doing
anything with the results. There's not much point in checking to
see if someone removed the file since the previous lstat, since the
FILE_ACTION_REMOVE code would have to deal with missing-file cases
anyway. Moreover, the "exists = false" assignment was a dead store;
nothing was done with that value later.
A syscall saved is a syscall earned, so back-patch to 9.5
where this code was introduced.
Discussion: https://postgr.es/m/[email protected]
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1f8c163c5acdef34dff14615337332cecc21d70b
Modified Files
--------------
src/bin/pg_rewind/filemap.c | 12 ------------
1 file changed, 12 deletions(-)