Re: More vacuum.c refactoring

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: More vacuum.c refactoring
Date: 2004-06-11 00:24:50
Message-ID: 20040611002450.GA5581@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2004-06-11 00:36:46 Re: [pgsql-hackers-win32] Tablespaces
Previous Message Manfred Koizar 2004-06-11 00:00:07 Re: More vacuum.c refactoring