Re: bogus psql "could not save history file[...]" message in 9.3.6 - Mailing list pgsql-bugs
| From | Jeff Frost |
|---|---|
| Subject | Re: bogus psql "could not save history file[...]" message in 9.3.6 |
| Date | |
| Msg-id | C62C1935-E674-4828-BA68-6C599263C600@pgexperts.com Whole thread Raw |
| In response to | Re: bogus psql "could not save history file[...]" message in 9.3.6 (Tom Lane <tgl@sss.pgh.pa.us>) |
| Responses |
Re: bogus psql "could not save history file[...]" message in 9.3.6
|
| List | pgsql-bugs |
> On Mar 13, 2015, at 9:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>=20
> "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' !!!
>=20
> 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.
>=20
> strace'ing psql while it exits might be informative.
Here you go:
Process 3951 attached
read(0, "\4", 1) =3D 1
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, =
{B38400 opost isig -icanon -echo ...}) =3D 0
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 =
opost isig icanon echo ...}) =3D 0
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, =
{B38400 opost isig icanon echo ...}) =3D 0
rt_sigaction(SIGINT, {0x7f5798b08730, [], SA_RESTORER|SA_RESTART, =
0x7f5797c3dff0}, {0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D=
0
rt_sigaction(SIGTERM, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGHUP, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGTSTP, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGTTOU, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGTTIN, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0ab0, [], SA_RESTORER, 0x7f5797c3dff0}, 8) =3D 0
rt_sigaction(SIGWINCH, {SIG_DFL, [], SA_RESTORER, 0x7f5797c3dff0}, =
{0x7f57986b0090, [], SA_RESTORER|SA_RESTART, 0x7f5797c3dff0}, 8) =3D 0
write(1, "\\q\n", 3) =3D 3
sendto(3, "X\0\0\0\4", 5, MSG_NOSIGNAL, NULL, 0) =3D 5
close(3) =3D 0
rt_sigaction(SIGPIPE, {SIG_DFL, [], SA_RESTORER|SA_RESTART, =
0x7f5797c3dff0}, {SIG_DFL, [], 0}, 8) =3D 0
rename("/var/lib/postgresql/.psql_history", =
"/var/lib/postgresql/.psql_history-") =3D -1 ENOENT (No such file or =
directory)
open("/var/lib/postgresql/.psql_history", O_WRONLY|O_CREAT|O_TRUNC, =
0600) =3D 3
write(3, "select 1;\n", 10) =3D 10
close(3) =3D 0
unlink("/var/lib/postgresql/.psql_history-") =3D -1 ENOENT (No such file =
or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) =3D =
-1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) =3D =
-1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) =3D -1 =
ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) =3D -1 =
ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) =3D -1 =
ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) =3D -1 ENOENT =
(No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", =
O_RDONLY) =3D -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", =
O_RDONLY) =3D -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) =3D=
-1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", =
O_RDONLY) =3D -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) =
=3D -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) =3D =
-1 ENOENT (No such file or directory)
write(2, "could not save history to file \""..., 94) =3D 94
exit_group(0) =3D ?
+++ exited with 0 +++=
pgsql-bugs by date: