Re: --with-libedit-preferred is bad design

Lists: pgsql-hackers
From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: --with-libedit-preferred is bad design
Date: 2013-07-13 01:04:39
Message-ID: 51E0A7A7.1040303@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hackers,

So I've been trying to compile PostgreSQL with libedit instead of
readline on a linux system, because of a bug in readline (will blog
about it later). This took 5 attempts, because of the peculiar nature
of our readline options in configure:

--without-readline

"compile without readline *or* libedit"

--with-libedit-preferred

"compile with libedit, but if there's an issue with libedit, then
silently substitute readline without telling me"

There's no option where I can say "please compile with libedit, and if
you can't, throw an error". In fact, if libedit isn't found, that's not
even reported in config.log -- your only way to find out you still have
readline is to ldd your psql after it's built.

For that matter, I find it hard to imagine where I would possibly want
the current functionality of --with-libedit-preferred. If I've asked
for libedit, then it's pretty darned sure it's because I don't want
readline.

I think the current --with-libedit-preferred should go away, and be
replaced by a --with-libedit option which throws an error if libedit
isn't found.

Feedback?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: --with-libedit-preferred is bad design
Date: 2013-07-13 01:31:42
Message-ID: 2278.1373679102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> I think the current --with-libedit-preferred should go away, and be
> replaced by a --with-libedit option which throws an error if libedit
> isn't found.

I'm not sure that will work well on systems where libedit masquerades
as readline...

TBH, given the number of bugs we've hit in libedit, encouraging its use
isn't something we should put effort into anyway. Or is it just that
Apple seems incapable of finding non-broken versions to ship?

regards, tom lane


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: --with-libedit-preferred is bad design
Date: 2013-07-13 02:10:22
Message-ID: 51E0B70E.10003@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 07/12/2013 06:31 PM, Tom Lane wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> I think the current --with-libedit-preferred should go away, and be
>> replaced by a --with-libedit option which throws an error if libedit
>> isn't found.
>
> I'm not sure that will work well on systems where libedit masquerades
> as readline...

Ah, was that the thinking behind that? In that case, maybe we could put
a warning in the config.log that libedit wasn't found? Right now,
there's nothing.

>
> TBH, given the number of bugs we've hit in libedit, encouraging its use
> isn't something we should put effort into anyway. Or is it just that
> Apple seems incapable of finding non-broken versions to ship?

That would hardly be only true of libedit, on Apple.

It's also broken on some Red Hat versions, last I checked.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: --with-libedit-preferred is bad design
Date: 2013-07-13 05:24:00
Message-ID: 51E0E470.2010506@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 7/12/2013 7:10 PM, Josh Berkus wrote:
>
> That would hardly be only true of libedit, on Apple.
>
> It's also broken on some Red Hat versions, last I checked.

Last I heard, libedit was completely borked. Here is a report (two years
old) of still broken libedit in Debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608442

IMO, we either need to take up the mantle of libedit maintenance or we
need to remove it from a configure option, it doesn't work anyway.

JD

>
>