Re: More vacuum.c refactoring - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: More vacuum.c refactoring
Date
Msg-id 20040611002450.GA5581@dcc.uchile.cl
Whole thread Raw
In response to Re: More vacuum.c refactoring  (Manfred Koizar <mkoi-pg@aon.at>)
Responses Re: More vacuum.c refactoring
List pgsql-hackers
On Fri, Jun 11, 2004 at 02:00:07AM +0200, Manfred Koizar wrote:

If I may ...

> > so you want to hack up vacuum.c?  This
> >module is delicate code --- we've had tons of bugs there in the past
> 
> But why is it so delicate?  Not only because it handles difficult
> problems, but also because it is written in a not very
> maintenance-friendly way.  Before I started refactoring the code
> repair_frag() had more than 1100 lines and (almost) all variables used
> anywhere in the function were declared at function level.

I agree.  This code is horrid.  I also agree with Tom in that this
should be done with extreme caution, but it is a needed task.

Maybe we could establish heavier testing for this kind of change so
potential patches can be tested extensively.  Concurrent vacuums with
all kinds of imaginable operations (insert, updates, deletes), in tight
loops, could be a start.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"No es bueno caminar con un hombre muerto"



pgsql-hackers by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: More vacuum.c refactoring
Next
From: "Dann Corbit"
Date:
Subject: Re: [pgsql-hackers-win32] Tablespaces