Re: New VACUUM FULL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New VACUUM FULL
Date
Msg-id 29833.1258244730@sss.pgh.pa.us
Whole thread Raw
In response to Re: New VACUUM FULL  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: New VACUUM FULL
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> 3. Some options are being set in vacuum() itself. It looks like the
> options should already be set in gram.y, so should that be an Assert
> instead? I think it's cleaner to set all of the options properly early
> on, rather than waiting until vacuum() to interpret the combinations.

As a rule of thumb, I'd recommend keeping as much complexity as possible
*out* of gram.y.  It's best if that code just reports the facts, ie what
options the user entered.  Deriving conclusions from that (like what
default behaviors should be used) is best done later.  One example of
why is that if you want the defaults to depend on GUC settings then
that logic must *not* happen in gram.y, since the parse tree might
outlive the current GUC settings.

I haven't read the patch but it sounds like vacuum() is the right
place for this type of activity.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: New VACUUM FULL
Next
From: Roger Leigh
Date:
Subject: Re: Unicode UTF-8 table formatting for psql text output