From: | "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_stop_backup wait bug fix |
Date: | 2008-12-03 04:26:12 |
Message-ID: | 3f0b79eb0812022026r379d6331k376c4fa87c7bdc85@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 3, 2008 at 5:13 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Fujii Masao wrote:
>>
>> On Wed, Oct 8, 2008 at 10:23 PM, Simon Riggs <simon(at)2ndquadrant(dot)com>
>> wrote:
>>>
>>> Minor bug fix for pg_stop_backup() to prevent it waiting longer than
>>> necessary in certain circumstances.
>>
>> Why don't you use XLByteToPrevSeg like pg_xlogfile_name?
>> I think that we should uniform the logic as much as possible.
>
> Agreed, should use XLByteToPrevSeg. But I wonder if we can just replace the
> current XLByteToSeg call with XLByteToPrevSeg? That would offset the return
> value of the function by one byte as well, as well as the value printed to
> the backup history file. In fact, I think the original patch got that wrong;
> it would return the location of the *beginning* of the last xlog file.
You're right. As you say, the value (stopxlogfilename) printed to the backup
history file is wrong. But, since the value is not used fortunately,
any troubles
have not come up. So, I think that we can just replace them.
>
> I also noticed that the 2nd BackupHistoryFileName call in that function is
> useless; histfilepath variable is already filled in earlier.
Somewhat confusingly, BackupHistoryFileName is called only once. Isn't 1st
(which probably you thought) BackupHistoryFilePath? In order to prevent
confusion, we should add new local variable (histfilename) for the backup
history file name?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2008-12-03 05:00:20 | Re: Sync Rep: First Thoughts on Code |
Previous Message | Tom Lane | 2008-12-03 03:32:32 | Re: Erroring out on parser conflicts |