On 10/26/15 12:08 PM, Tom Lane wrote:
> news@emmanuelsambo.com writes:
>> The following bug has been logged on the website:
>> Bug reference: 13733
>> Logged by: Emmanuel Sambo
>> Email address: news@emmanuelsambo.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.