From: | Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Frost <jeff(at)pgexperts(dot)com>, "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 05:46:18 |
Message-ID: | 5503CB2A.5020003@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 14/03/15 15:46, Alvaro Herrera wrote:
> Tom Lane wrote:
>> Jeff Frost <jeff(at)pgexperts(dot)com> writes:
>>>> On Mar 13, 2015, at 9:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> strace'ing psql while it exits might be informative.
>>
>>> Here you go:
>>
>>> ...
>>> rename("/var/lib/postgresql/.psql_history", "/var/lib/postgresql/.psql_history-") = -1 ENOENT (No such file or directory)
>>> open("/var/lib/postgresql/.psql_history", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 3
>>> write(3, "select 1;\n", 10) = 10
>>> close(3) = 0
>>> unlink("/var/lib/postgresql/.psql_history-") = -1 ENOENT (No such file or directory)
>>
>> ... WTF? That rename() and that unlink() are certainly not coming from
>> Postgres, and I do not see anything like that in the libedit sources
>> either. (I'm looking at the libedit-20141030-3.1 version that Fedora
>> is currently shipping.) That must be coming from some Ubuntu-specific
>> patch?
>
> You can use
> apt-get source libedit2
> to obtain a copy of the tarball plus all the patches that were applied
> to build the package.
>
Also might be worth checking the ownership of postgres home directory
(/var/lib/postgresql) - I'd hazard a guess that it is owned by root and
postgres cannot write the history file.
Cheers
Mark
From | Date | Subject | |
---|---|---|---|
Next Message | jaime soler | 2015-03-14 13:05:46 | Re: BUG #12836: pljava.dll for postgres 9.4.1-64 bit |
Previous Message | Alvaro Herrera | 2015-03-14 02:46:19 | Re: bogus psql "could not save history file[...]" message in 9.3.6 |