Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, David Fetter <david(at)fetter(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Kenneth Marshall <ktm(at)rice(dot)edu>, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>
Subject: Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)
Date: 2009-05-26 18:20:13
Message-ID: 16229.1243362013@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, May 26, 2009 at 10:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I don't trust filterdiff one bit :-(

> For any particular reason, or just natural skepticism?

IIRC it was demonstrated to be broken the last time it was proposed
as a solution to our problems. Maybe it's been fixed since then, but
I don't have any confidence in it, since evidently it's not been stress
tested very hard.

> I believe there have been some wild-eyed claims tossed around in this
> space previously that unified diffs don't provide all the same
> information as context diffs, which is flatly false.

No, the gripe has always been just that they're less readable for
nontrivial changes.

> The not-so-nice thing about unified diffs is that when there is a huge
> hunk of code that's changed, there are probably by chance a few
> identical lines buried in there, like " }", so the + and - lines
> end up mixed together in a way that wouldn't happen in a context diff
> (which would turn the whole thing into two big "!" sections). It's no
> problem for a machine to understand this, but it's hard to read for a
> human being.

Exactly. Even without identical lines, I find that the old and new code
gets intermixed in easily-confusing ways. -u is very readable for
isolated single-line changes, but for anything larger, not so much.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-26 18:27:15 Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)
Previous Message Tom Lane 2009-05-26 18:05:29 Re: A couple of gripes about the gettext plurals patch