Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)
Date: 2011-04-03 22:33:03
Message-ID: AANLkTim_J-iQtYK8pzyFJ3jAjgkJnoSOX1y-PCqPaNtT@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 3, 2011 at 1:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> IMO the real problem is essentially that GUC assign hooks have two
> functions, checking and canonicalization of the value-to-be-stored
> versus executing secondary actions when an assignment is made; and
> there's no way to get at just the first one.

Yes, I think that's right. A related point is that the API for assign
hooks is not consistent across all data types: string assign hooks can
return a replacement value, whereas everyone else can only succeed or
fail.

> It would probably take less than a day to flesh out this idea and make
> it happen, but it does seem like a rather large change for late alpha.
> If people don't want to do this now, I suggest that we just live with
> the problem for 9.1.  It's purely cosmetic, and easy enough to work
> around (just don't uncomment the default value).

I think it's a pretty ugly wart, so I'm inclined to say go ahead and
fix it. I'm not sure what alpha is for if it's not cleaning up the
detritus of all the stuff we've committed in the last 9 months. AIUI,
what we're trying to avoid is committing new stuff that may require
additional cleanup, not cleaning up the stuff we already did commit.
Once we get to beta I'll be less enthusiastic about making changes
like this, but I think most of the testing that will get done is still
in front of us.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-03 23:16:32 Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)
Previous Message Heikki Linnakangas 2011-04-03 18:05:59 Re: FDW state from plan time