psql: FATAL: could not write init file

Posted by Leonardo M. Ramé on Server Fault See other posts from Server Fault or by Leonardo M. Ramé
Published on 2011-11-11T13:23:58Z Indexed on 2011/11/12 1:56 UTC
Read the original article Hit count: 7394

Filed under:
|

as the title points out, I'm getting this error when trying to connect to a PostgreSql database from command line, using PostgreSQL.

The client machine is an Ubuntu 11.10 x86_64 and the PostgreSQL libraries are from Version 9.1

Server is PostgreSql 8.3.

This is the command that I executed:

psql -U postgres -d my_database -h 192.168.0.161 -p 5432 -c "select * from xxyy"

I get the same results when I use sudo or su postgres.

The sad thing is that I can connect without problems using pgAdmin.

Any hint?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about postgresql