Imperfect solutions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Imperfect solutions
Date: 2001-05-31 03:42:16
Message-ID: 200105310342.f4V3gGs22587@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was remembering tonight some of the strange fixes we made in the early
days of PostgreSQL. I particularly remember the LIKE optimization I did
in gram.y to allow queries that are anchored to the beginning of a
string to use an index.

It was a crazy patch, and everyone who saw it grumbled. The problem was
that no one could think of a better solution. Finally the proper fix
was made to the optimizer and the code removed. I was glad to see it
go, if only so I didn't have to hear complaints about it. :-)

The good thing about the patch is that it gave us a feature for two
years while we gained experience to make the right fix, and it was easy
to remove once the time came.

I am now wondering if we are agonizing too much about changes to
PostgreSQL. We are much more successful, and much more reliable than we
used to be, but I wonder whether we are limiting improvements because
they are not the _right_ fix.

I am not advocating that we start throwing all sorts of stuff into the
backend. This certainly would leave us with a big mess. I am just
noticing that we are hitting road blocks where we can't find the perfect
solution, so we do nothing, even when users are complaining they need a
certain feature. I think we can all remember recent discussions or TODO
items where this happened.

Seem like it would be a good idea sometimes add feature, even an
imperfect one, until we can make a better fix, because sometimes, the
perfect fix is years away. I never expected my gram.y hack to last as
long as it did.

Let me make a suggestion. Next time we have a partial fix for
something, but don't want to add it, let's add the item on the TODO list
under the heading "Imperfect Fixes," where we list items we have fixed
but need more work. This way, we will be able to give users a feature,
but we will not forget to revisit the item and make a _perfect_ fix
later.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Samuel 2001-05-31 04:04:57 Re: Support for %TYPE in CREATE FUNCTION
Previous Message Ian Lance Taylor 2001-05-31 01:01:19 Re: Support for %TYPE in CREATE FUNCTION