Re: BUG #13733: ~/.psql_history* corrupted

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, news(at)emmanuelsambo(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13733: ~/.psql_history* corrupted
Date: 2015-11-02 19:03:02
Message-ID: 5637B366.3010308@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/26/15 12:08 PM, Tom Lane wrote:
> news(at)emmanuelsambo(dot)com writes:
>> The following bug has been logged on the website:
>> Bug reference: 13733
>> Logged by: Emmanuel Sambo
>> Email address: news(at)emmanuelsambo(dot)com
>> PostgreSQL version: 9.4.5
>> Operating system: Apple Mac OS X El Capitan 10.11.1
>> Description:
>
>> Upgrading from PostgreSQL 9.4.4 to 9.4.5 deleted my entire psql history in
>> two of my ~/.psql_history-<db>
>> Looking at this file I can see:
>> - all the spaces are encoded as utf-8: "\040"
>> - each history entry is truncated at 1021 characters
>
> This probably means you accidentally switched from using libedit to
> libreadline, or vice versa, when you rebuilt Postgres. They're not
> very compatible as to history file format :-(

I have noticed that building PostgreSQL with libxml support on El
Capitan by default ends up building against the system libedit, because
it has a symlink at /usr/lib/libreadline.dylib, and xml2-config points
to that directory, so it ends up early in the search path.

Since I don't have the pre-El Capitan installation anymore, and can't
verify whether this changed, but the problem is pretty clear.

For the time being, I'm working around it like this:

XML2_CONFIG=:
CPPFLAGS=-I/usr/include/libxml2

Of course, building without libxml would also work.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-11-02 19:14:37 Re: BUG #13733: ~/.psql_history* corrupted
Previous Message Peter Eisentraut 2015-11-02 18:56:19 Re: BUG #13736: pg_dump should use E'' quotes