pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #13733: ~/.psql_history* corrupted
7+ messages / 4 participants
[nested] [flat]
* BUG #13733: ~/.psql_history* corrupted
@ 2015-10-26 15:22 news@emmanuelsambo.com
0 siblings, 1 reply; 7+ messages in thread
From: news@emmanuelsambo.com @ 2015-10-26 15:22 UTC (permalink / raw)
To: pgsql-bugs
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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-10-26 16:08 Tom Lane <tgl@sss.pgh.pa.us>
parent: news@emmanuelsambo.com
0 siblings, 2 replies; 7+ messages in thread
From: Tom Lane @ 2015-10-26 16:08 UTC (permalink / raw)
To: news@emmanuelsambo.com; +Cc: pgsql-bugs
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 :-(
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-10-28 14:43 E. Sambo <news@emmanuelsambo.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 7+ messages in thread
From: E. Sambo @ 2015-10-28 14:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
I figured it out. The homebrew 9.4.5 El Capitan bottle is bad because of
Xcode. I documented it in https://github.com/Homebrew/homebrew/issues/45405
On Mon, Oct 26, 2015 at 11:08 AM, Tom Lane <tgl@sss.pgh.pa.us> 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 :-(
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-11-02 19:03 Peter Eisentraut <peter_e@gmx.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 7+ messages in thread
From: Peter Eisentraut @ 2015-11-02 19:03 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; news@emmanuelsambo.com; +Cc: pgsql-bugs
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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-11-02 19:14 Tom Lane <tgl@sss.pgh.pa.us>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2015-11-02 19:14 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: news@emmanuelsambo.com; pgsql-bugs
Peter Eisentraut <peter_e@gmx.net> writes:
> 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.
Hm, I do not see anything like that on Yosemite:
$ which xml2-config
/usr/bin/xml2-config
$ xml2-config
Usage: xml2-config [OPTION]
Known values for OPTION are:
--prefix print the install prefix
--libs print library linking information
--cflags print pre-processor and compiler flags
--modules module support enabled
--help display this help and exit
--version output version information
$ xml2-config --libs
-lxml2
$ xml2-config --cflags
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2
$ xml2-config --prefix
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr
The /usr/lib/libreadline.dylib symlink has been there pretty much
forever, so that's not a new hazard.
You didn't say, but I assume what you're seeing is that "xml2-config
--cflags" now emits some -L switches along with -I?
Maybe we could fix that by inserting xml2-config's switches after the
user's, instead of before.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-11-02 21:03 Peter Eisentraut <peter_e@gmx.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Peter Eisentraut @ 2015-11-02 21:03 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: news@emmanuelsambo.com; pgsql-bugs
On 11/2/15 2:14 PM, Tom Lane wrote:
> $ xml2-config --libs
> -lxml2
> $ xml2-config --cflags
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2
> $ xml2-config --prefix
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr
>
> The /usr/lib/libreadline.dylib symlink has been there pretty much
> forever, so that's not a new hazard.
>
> You didn't say, but I assume what you're seeing is that "xml2-config
> --cflags" now emits some -L switches along with -I?
xml2-config --libs emits -L switches that point into Xcode, similar to
the -I switch shown above.
But after running
sudo xcode-select -s /Library/Developer/CommandLineTools
as suggested in the links mentioned earlier in the thread, this goes
away. Apparently, Apple fixed this in one of their minor software updates.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #13733: ~/.psql_history* corrupted
@ 2015-11-10 17:26 E. Sambo <news@emmanuelsambo.com>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 7+ messages in thread
From: E. Sambo @ 2015-11-10 17:26 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs
This has been fixed in https://github.com/Homebrew/homebrew/issues/45405
Thank you everyone for your valuable help
On Mon, Nov 2, 2015 at 3:03 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On 11/2/15 2:14 PM, Tom Lane wrote:
> > $ xml2-config --libs
> > -lxml2
> > $ xml2-config --cflags
> >
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2
> > $ xml2-config --prefix
> >
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr
> >
> > The /usr/lib/libreadline.dylib symlink has been there pretty much
> > forever, so that's not a new hazard.
> >
> > You didn't say, but I assume what you're seeing is that "xml2-config
> > --cflags" now emits some -L switches along with -I?
>
> xml2-config --libs emits -L switches that point into Xcode, similar to
> the -I switch shown above.
>
> But after running
>
> sudo xcode-select -s /Library/Developer/CommandLineTools
>
> as suggested in the links mentioned earlier in the thread, this goes
> away. Apparently, Apple fixed this in one of their minor software updates.
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2015-11-10 17:26 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26 15:22 BUG #13733: ~/.psql_history* corrupted news@emmanuelsambo.com
2015-10-26 16:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-10-28 14:43 ` E. Sambo <news@emmanuelsambo.com>
2015-11-02 19:03 ` Peter Eisentraut <peter_e@gmx.net>
2015-11-02 19:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-11-02 21:03 ` Peter Eisentraut <peter_e@gmx.net>
2015-11-10 17:26 ` E. Sambo <news@emmanuelsambo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox