Re: bogus psql "could not save history file[...]" message in 9.3.6 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: bogus psql "could not save history file[...]" message in 9.3.6
Date
Msg-id 31313.1426298202@sss.pgh.pa.us
Whole thread Raw
In response to bogus psql "could not save history file[...]" message in 9.3.6  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: bogus psql "could not save history file[...]" message in 9.3.6  (Jeff Frost <jeff@pgexperts.com>)
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
>> \q # 'could not save history to file "/var/lib/postgresql/.psql_history":
> No such file or directory' !!!

BTW, I poked around in the libedit sources and noted that it will call
wctomb() during write_history(), assuming it's configured to support wide
characters.  Working hypothesis is that wctomb() is trying to read some
locale configuration file and not finding it, which it's probably okay
with, but our is-errno-set check is unhappy later.  This behavior might
well vary depending on what locale environment you have set.

strace'ing psql while it exits might be informative.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: bogus psql "could not save history file[...]" message in 9.3.6
Next
From: Jeff Frost
Date:
Subject: Re: bogus psql "could not save history file[...]" message in 9.3.6