| От | Tom Lane |
|---|---|
| Тема | Re: Dubious code in pg_rewind's process_target_file() |
| Дата | |
| Msg-id | 1222282.1599329909@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Dubious code in pg_rewind's process_target_file() (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Dubious code in pg_rewind's process_target_file()
|
| Список | pgsql-hackers |
I wrote:
> It looks to me like we could replace "exists = false" with "return",
> rather than uselessly constructing a FILE_ACTION_REMOVE entry for
> a file we've already proven is not there.
Or actually, maybe we should just drop the lstat call altogether?
AFAICS it's 99.99% redundant with the lstat that traverse_datadir
has done nanoseconds before. Yeah, maybe somebody managed to drop
the file in between, but the FILE_ACTION_REMOVE code would have to
deal with such cases anyway in case a drop occurs later.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера