From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_stop_backup wait bug fix |
Date: | 2008-12-02 20:13:02 |
Message-ID: | 493596CE.6040408@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
I also noticed that the 2nd BackupHistoryFileName call in that function
is useless; histfilepath variable is already filled in earlier.
How does the attached patch look to you? Do you have an easy way to test
this?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
pg_stop_backup_wait-heikki-1.patch | text/x-diff | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-12-02 20:39:47 | Re: Simple postgresql.conf wizard |
Previous Message | Simon Riggs | 2008-12-02 19:21:18 | Re: Sync Rep: First Thoughts on Code |