pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Remove useless lstat() call in pg_rewind. 7+ messages / 1 participants [nested] [flat]
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/666e9a90f09a1ab89959774273597764e6e0f9ad Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e7f06ea60a3c07128176b294ce3fb0555edd15a5 Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a7bcf391f329561307a3d936443a715ad74a2e9d Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/75e44b471c511bc2aec0e869ab0d23d249890734 Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7d60e4183013c8b1316daf4ec0d08ef245d3b92c Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us 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(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove useless lstat() call in pg_rewind. @ 2020-09-06 15:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-09-06 15:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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/1221796.1599329320@sss.pgh.pa.us Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/be6667081e233d5868dd7e59ca2226348a489fb5 Modified Files -------------- src/bin/pg_rewind/filemap.c | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-09-06 15:51 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us> 2020-09-06 15:51 pgsql: Remove useless lstat() call in pg_rewind. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox