Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] remove redundant ownership checks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] remove redundant ownership checks
Date: 2010-01-13 18:15:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Jan 11, 2010 at 8:27 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Robert Haas wrote:
>> On Sun, Jan 10, 2010 at 4:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> >> I have looked this over a little bit and I guess I don't see why the
>> >> lack of a grand plan for how to organize all of our permissions checks
>> >> ought to keep us from removing this one on the grounds of redundancy.
>> >> We have to attack this problem in small pieces if we're going to make
>> >> any progress, and the pieces aren't going to get any smaller than
>> >> this.
>> >
>> > I would turn that argument around: given the lack of a grand plan,
>> > why should we remove this particular check at all?  Nobody has argued
>> > that there would be a significant, or even measurable, performance gain.
>> > When and if we do have a plan, we might find ourselves putting this
>> > check back.
>> You're arguing against a straw man - there's clearly no argument here
>> from performance.  We generally do not choose to litter the code with
>> redundant or irrelevant checks because it makes the code difficult to
>> maintain and understand.  Sometimes it also hurts performance, but
>> that's not a necessary criterion for removal.  Nor are we generally in
>> the habit of keeping redundant code around because a hypothetical
>> future refactoring might by chance end up putting exactly the same
>> code back.
> I agree.  Why are arbitrary restrictions being placed on code
> improvements?  If code has no purpose, why not remove it, or at least
> mark it as NOT_USED.

So, where do we go from here?  Any other opinions?  I'm not sure how
much it's really worth fighting over a six line patch, but there's
something in me that rails against the idea of telling someone who
took the trouble to write a patch "no" when the only argument against
it is that we might change our mind at some point in the future.  Of
course, I will accept the consensus of the community whatever it is,
but the only people who have expressed a clear opinion on this version
of the patch are Tom, Bruce, and myself, and 2-1 is not a consensus.


In response to


pgsql-hackers by date

Next:From: Josh BerkusDate: 2010-01-13 18:16:21
Subject: Re: plpython3
Previous:From: Joshua D. DrakeDate: 2010-01-13 18:08:48
Subject: Re: plpython3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group