pg_rewind failure by file deletion in source server

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pg_rewind failure by file deletion in source server
Дата
Msg-id CAHGQGwEdsNgeNZo+GyrzZtjW_TkC=XC6XxrjuAZ7=X_cj1aHHg@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_rewind failure by file deletion in source server
Список pgsql-hackers
Hi,

While testing pg_rewind, I got the following error and pg_rewind failed.
   $ pg_rewind -D ... --source-server="..." -P   ERROR:  could not open file "base/13243/16384" for reading: No
such file or directory   STATEMENT:  SELECT path, begin,         pg_read_binary_file(path, begin, len) AS chunk
FROMfetchchunks
 

As far as I read the pg_rewind code, ISTM that the file deletion in
source server while pg_rewind is running can cause pg_rewind to fail.
That is, at first pg_rewind picks up the files to copy (or do some actions)
and creates the file map. Then it performs the actual operation (e.g.,
file copy from source to dest) according to the file map. The problem
can happen if the source server deletes the file listed in the file map
before pg_rewind performs the actual operations. The copy of the file
must fail because it's not found in source server, and then pg_rewind
exits with an error.

Shouldn't pg_rewind ignore that failure of operation? If the file is not
found in source server, the file doesn't need to be copied to destination
server obviously. So ISTM that pg_rewind safely can skip copying that file.
Thought?

Regards,

-- 
Fujii Masao



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rosiński Krzysztof 2 - Detal
Дата:
Сообщение: Re: [idea] table partition + hash join
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: skipping pg_log in basebackup (was Re: pg_basebackup and pg_stat_tmp directory)