Re: Change pgarch_readyXlog() to return .history files first

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: Change pgarch_readyXlog() to return .history files first
Дата
Msg-id 3c9772ef-2c75-24b9-4f5a-a7a58bc083f9@pgmasters.net
обсуждение исходный текст
Ответ на Re: Change pgarch_readyXlog() to return .history files first  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Change pgarch_readyXlog() to return .history files first  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 12/21/18 6:49 AM, Kyotaro HORIGUCHI wrote:
> "else if (!historyFound || ishistory)"
> 
> 
> 
>>         strcpy(xlog, newxlog);
> 
> The caller prepares sufficient memory for basename, and we no
> longer copy ".ready" into newxlog. Douldn't we work directly on
> xlog instead of allocating newxlog?

I thought about doing that, but wanted to focus on the task at hand.  It 
does save a strcpy and a bit of stack space, so seems like a win.

Overall, the patch looks good to me.  I think breaking up the if does 
make the code more readable.

Regards,
-- 
-David
david@pgmasters.net


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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Add timeline to partial WAL segments
Следующее
От: David Steele
Дата:
Сообщение: Re: Remove Deprecated Exclusive Backup Mode