Re: bogus psql "could not save history file[...]" message in 9.3.6

From: Jeff Frost <jeff(at)pgexperts(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: bogus psql "could not save history file[...]" message in 9.3.6
Date: 2015-03-14 01:54:25
Message-ID: 59371DEA-E199-479C-95E0-EFE3A50361AA@pgexperts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


> On Mar 13, 2015, at 6:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>> On Fri, Mar 13, 2015 at 6:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Running ldd on the psql executable would be a good first step.
>
>> ​libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007f8b3af22000)
>
> Righto. So now, what version of libedit have you got? (On Red Hat
> "rpm -q libedit" would be the thing to do, but I have no idea about
> Ubuntu's package manager.)
>
> regards, tom lane

This is from an empty 14.04 vagrant where I installed postgresql-9.3 from the apt.postgresql.org <http://apt.postgresql.org/> repo:

agrant(at)vagrant-ubuntu-trusty-64:/etc/apt/sources.list.d$ dpkg -S /usr/lib/x86_64-linux-gnu/libedit.so.2
libedit2:amd64: /usr/lib/x86_64-linux-gnu/libedit.so.2

vagrant(at)vagrant-ubuntu-trusty-64:/etc/apt/sources.list.d$ dpkg --list libedit2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================================-=========================-=========================-=====================================================================================
ii libedit2:amd64 3.1-20130712-2 amd64 BSD editline and history libraries

And it does the same thing:

vagrant(at)vagrant-ubuntu-trusty-64:/etc/apt/sources.list.d$ sudo su - postgres
postgres(at)vagrant-ubuntu-trusty-64:~$ psql
psql (9.3.6)
Type "help" for help.

postgres=# select 1;
?column?
----------
1
(1 row)

postgres=# \q
could not save history to file "/var/lib/postgresql/.psql_history": No such file or directory

postgres(at)vagrant-ubuntu-trusty-64:~$ ls -l /var/lib/postgresql/.psql_history
-rw------- 1 postgres postgres 10 Mar 14 01:53 /var/lib/postgresql/.psql_history
postgres(at)vagrant-ubuntu-trusty-64:~$

postgres(at)vagrant-ubuntu-trusty-64:~$ cat .psql_history
select 1;

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-03-14 01:55:18 Re: bogus psql "could not save history file[...]" message in 9.3.6
Previous Message Tom Lane 2015-03-14 01:42:28 Re: bogus psql "could not save history file[...]" message in 9.3.6