pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed.psql_history": No such file
5+ messages / 4 participants
[nested] [flat]
* .psql_history": No such file
@ 2009-06-26 15:53 ivan marchesini <marchesini@unipg.it>
0 siblings, 2 replies; 5+ messages in thread
From: ivan marchesini @ 2009-06-26 15:53 UTC (permalink / raw)
To: pgsql-sql
Dear users,
I have installed a postgres db using a datadir different
from /var/lib/pgsql/.psql_history.
then:
su postgres
psql postgres
All went fine but when I exit from psql from a db I obtain:
_______
could not save history to file "/var/lib/pgsql/.psql_history": No such
file or directory
_______
how can I fix this problem? where can I say psql that it must
write .psql_history into the datadir?
many thanks...
ivan
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: .psql_history": No such file
@ 2009-06-26 16:11 Tom Lane <tgl@sss.pgh.pa.us>
parent: ivan marchesini <marchesini@unipg.it>
1 sibling, 0 replies; 5+ messages in thread
From: Tom Lane @ 2009-06-26 16:11 UTC (permalink / raw)
To: marchesini@unipg.it; +Cc: pgsql-sql
ivan marchesini <marchesini@unipg.it> writes:
> I have installed a postgres db using a datadir different
> from /var/lib/pgsql/.psql_history.
> then:
> su postgres
> psql postgres
> All went fine but when I exit from psql from a db I obtain:
> _______
> could not save history to file "/var/lib/pgsql/.psql_history": No such
> file or directory
> _______
Apparently the postgres account still has HOME set to /var/lib/pgsql.
You'll want to make that point to some directory that actually exists.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: .psql_history": No such file
@ 2009-06-26 16:14 Guillaume Lelarge <guillaume@lelarge.info>
parent: ivan marchesini <marchesini@unipg.it>
1 sibling, 1 reply; 5+ messages in thread
From: Guillaume Lelarge @ 2009-06-26 16:14 UTC (permalink / raw)
To: pgsql-sql; marchesini@unipg.it
Hi Ivan,
Le vendredi 26 juin 2009 à 17:53:15, ivan marchesini a écrit :
> [...]
> I have installed a postgres db using a datadir different
> from /var/lib/pgsql/.psql_history.
>
> then:
> su postgres
> psql postgres
>
> All went fine but when I exit from psql from a db I obtain:
> _______
> could not save history to file "/var/lib/pgsql/.psql_history": No such
> file or directory
> _______
>
> how can I fix this problem? where can I say psql that it must
> write .psql_history into the datadir?
>
psql tries to write there because the home directory of the postgres user is
/var/lib/postgres. Probably better to use HISTFILE to change it (\set HISTFILE
'/path/to/histfile').
Regards.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: .psql_history": No such file
@ 2009-06-27 15:34 Shane Ambler <pgsql@Sheeky.Biz>
parent: Guillaume Lelarge <guillaume@lelarge.info>
0 siblings, 1 reply; 5+ messages in thread
From: Shane Ambler @ 2009-06-27 15:34 UTC (permalink / raw)
To: Guillaume Lelarge <guillaume@lelarge.info>; +Cc: pgsql-sql; marchesini@unipg.it
Guillaume Lelarge wrote:
> Hi Ivan,
>
> Le vendredi 26 juin 2009 à 17:53:15, ivan marchesini a écrit :
>> [...]
>> I have installed a postgres db using a datadir different
>> from /var/lib/pgsql/.psql_history.
>>
>> then:
>> su postgres
>> psql postgres
>>
>> All went fine but when I exit from psql from a db I obtain:
>> _______
>> could not save history to file "/var/lib/pgsql/.psql_history": No such
>> file or directory
>> _______
>>
>> how can I fix this problem? where can I say psql that it must
>> write .psql_history into the datadir?
>>
>
> psql tries to write there because the home directory of the postgres user is
> /var/lib/postgres. Probably better to use HISTFILE to change it (\set HISTFILE
> '/path/to/histfile').
>
> Regards.
>
>
You do know that you don't need to su postgres to start psql?
Only the server needs to be run with the postgres user account. If you
run psql from your normal user account the history file will be saved
into your home folder not the postgresql install/data file dir.
--
Shane Ambler
pgSQL (at) Sheeky (dot) Biz
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: .psql_history": No such file
@ 2009-06-29 07:47 ivan marchesini <marchesini@unipg.it>
parent: Shane Ambler <pgsql@Sheeky.Biz>
0 siblings, 0 replies; 5+ messages in thread
From: ivan marchesini @ 2009-06-29 07:47 UTC (permalink / raw)
To: Shane Ambler <pgsql@Sheeky.Biz>; +Cc: Guillaume Lelarge <guillaume@lelarge.info>; pgsql-sql
Thanks to all...
in effect it is a very little problem if you consider that probably I
will call psql from normal accounts...
:-)
thanks
Il giorno dom, 28/06/2009 alle 01.04 +0930, Shane Ambler ha scritto:
> Guillaume Lelarge wrote:
> > Hi Ivan,
> >
> > Le vendredi 26 juin 2009 à 17:53:15, ivan marchesini a écrit :
> >> [...]
> >> I have installed a postgres db using a datadir different
> >> from /var/lib/pgsql/.psql_history.
> >>
> >> then:
> >> su postgres
> >> psql postgres
> >>
> >> All went fine but when I exit from psql from a db I obtain:
> >> _______
> >> could not save history to file "/var/lib/pgsql/.psql_history": No such
> >> file or directory
> >> _______
> >>
> >> how can I fix this problem? where can I say psql that it must
> >> write .psql_history into the datadir?
> >>
> >
> > psql tries to write there because the home directory of the postgres user is
> > /var/lib/postgres. Probably better to use HISTFILE to change it (\set HISTFILE
> > '/path/to/histfile').
> >
> > Regards.
> >
> >
> You do know that you don't need to su postgres to start psql?
>
> Only the server needs to be run with the postgres user account. If you
> run psql from your normal user account the history file will be saved
> into your home folder not the postgresql install/data file dir.
>
>
> --
>
> Shane Ambler
> pgSQL (at) Sheeky (dot) Biz
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2009-06-29 07:47 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-26 15:53 .psql_history": No such file ivan marchesini <marchesini@unipg.it>
2009-06-26 16:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-06-26 16:14 ` Guillaume Lelarge <guillaume@lelarge.info>
2009-06-27 15:34 ` Shane Ambler <pgsql@Sheeky.Biz>
2009-06-29 07:47 ` ivan marchesini <marchesini@unipg.it>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox