Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files
Дата
Msg-id CAPpHfdvzBAZj7ZjcaCZdwbhVrfK=89=RDv+Mnsj17HSx9RDDOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WALfiles  (chenhj <chjischj@163.com>)
Ответы Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WALfiles  (chenhj <chjischj@163.com>)
Список pgsql-hackers
On Thu, Sep 28, 2017 at 6:44 PM, chenhj <chjischj@163.com> wrote:
On 2017-09-28 01:29:29,"Alexander Korotkov" <a.korotkov@postgrespro.ru> wrote:
It appears that your patch conflicts with fc49e24f.  Please, rebase it.

Yes, i had rebased it, Please check the new patch. 

Good, now it applies cleanly.

else if (strncmp(path, XLOGDIR"/", strlen(XLOGDIR"/")) == 0 &&
IsXLogFileName(path + strlen(XLOGDIR"/")) &&
(strcmp(path + strlen(XLOGDIR"/") + 8, divergence_wal_filename + 8) < 0 ||
 strcmp(path + strlen(XLOGDIR"/") + 8, last_source_wal_filename + 8) > 0))

According to our conding style, you should leave a space betwen XLOGDIF and "/".
Also, you do a trick by comparison xlog segment numbers using strcmp().  It's nice, but I would prefer seeing XLogFromFileName() here.  It would improve code readability and be less error prone during further modifications.


------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] crash-recovery test vs windows
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: [HACKERS] pg_prepared_xact_status