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

From: David Steele <david(at)pgmasters(dot)net>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, michael(at)paquier(dot)xyz
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change pgarch_readyXlog() to return .history files first
Date: 2018-12-21 06:17:12
Message-ID: 3c9772ef-2c75-24b9-4f5a-a7a58bc083f9@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2018-12-21 06:18:33 Re: Remove Deprecated Exclusive Backup Mode
Previous Message David Steele 2018-12-21 06:12:43 Re: Add timeline to partial WAL segments