Lists: | pgsql-bugs |
---|
From: | news(at)emmanuelsambo(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-10-26 15:22:14 |
Message-ID: | 20151026152214.3021.13548@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | news(at)emmanuelsambo(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-10-26 16:08:49 |
Message-ID: | 28958.1445875729@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 503 토토 베이 페치 실패 |
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 :-(
regards, tom lane
From: | "E(dot) Sambo" <news(at)emmanuelsambo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-10-28 14:43:22 |
Message-ID: | CAF+rkrags3OOiOEsBanZES3Ot2iDdYQ_abAwgb0pysFeYcC7UQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)sss(dot)pgh(dot)pa(dot)us> 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 :-(
>
> regards, tom lane
>
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 |
Lists: | Postg롤 토토SQL : Postg롤 토토SQL 메일 링리스트 : 2015-11-02 이후 PGSQL-BUGS 19:03 |
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.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | news(at)emmanuelsambo(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-11-02 19:14:37 |
Message-ID: | 29116.1446491677@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Peter Eisentraut <peter_e(at)gmx(dot)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
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | news(at)emmanuelsambo(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-11-02 21:03:51 |
Message-ID: | 5637CFB7.2090802@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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.
From: | "E(dot) Sambo" <news(at)emmanuelsambo(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13733: ~/.psql_history* corrupted |
Date: | 2015-11-10 17:26:47 |
Message-ID: | CAF+rkrYUL2pnEXzBaFVzn+-_6PmUWjnAP93+tWYrvbAQ478=DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)gmx(dot)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.
>
>