Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-06 Thread Bruce Momjian
Jonah H. Harris wrote: > On 5/6/06, Martijn van Oosterhout wrote: > > I've not seen any patch for this come past... > > Yes, I got a little busy. I ended up refactoring a good amount of the > code because the entire thing is a little ugly. I'll go ahead and > just fix the Coverity stuff first a

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-06 Thread Jonah H. Harris
On 5/6/06, Martijn van Oosterhout wrote: I've not seen any patch for this come past... Yes, I got a little busy. I ended up refactoring a good amount of the code because the entire thing is a little ugly. I'll go ahead and just fix the Coverity stuff first and send the refactored patch later

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-06 Thread Martijn van Oosterhout
On Mon, May 01, 2006 at 10:26:33PM -0400, Jonah H. Harris wrote: > Just to update everyone, I've refactored a good amount of the > rebuild-control-values-from-WAL code and should have it ready for > -patches tomorrow. I've not seen any patch for this come past... Have a nice day, -- Martijn van

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Jonah H. Harris
Just to update everyone, I've refactored a good amount of the rebuild-control-values-from-WAL code and should have it ready for -patches tomorrow. -- Jonah H. Harris, Database Internals Architect EnterpriseDB Corporation 732.331.1324 ---(end of broadcast)-

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Jonah H. Harris
On 5/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: Definitely bad, very bad. Please put back the lock-checking code. That's what I was thinking. -- Jonah H. Harris, Database Internals Architect EnterpriseDB Corporation 732.331.1324 ---(end of broadcast)---

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Tom Lane
"Jonah H. Harris" <[EMAIL PROTECTED]> writes: > While refactoring the patch, I've noticed that this patch allowed > pg_resetxlog to proceed while the server could potentially be up... is > this the desired behavior or should we require the lock file to be > removed first (as it was prior to this pa

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Jonah H. Harris
On 5/1/06, Jonah H. Harris <[EMAIL PROTECTED]> wrote: I just scanned it, and it's pretty ugly overall. Did one of you guys want to clean it up? If not, I'll do it today. While refactoring the patch, I've noticed that this patch allowed pg_resetxlog to proceed while the server could potentiall

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Jonah H. Harris
On 5/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: This certainly looks like it was written by someone who'd just learned about lists yesterday :-(. I wonder how many other problems there are in that resetxlog patch? I didn't bother to look at it at all myself. Anyone have time to review it? I ju

Re: [HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Tom Lane
Martijn van Oosterhout writes: > May I propose the entire part of that function after the comment /* the > list is empty. */ be replaced with something like the following (or > whatever idiom people prefer for singly-linked lists): This certainly looks like it was written by someone who'd just le

[HACKERS] InsertXLogFile in pg_resetxlog

2006-05-01 Thread Martijn van Oosterhout
There's been some new code added to pg_resetxlog which is confusing enough that Coverity is convinced there's a possible memory leak in InsertXLogFile. I think it may actually be a bug. At the least this bit needs rewriting to make it clearer what it does. What I think happens is this: 1. Assume