0
votes
2answers
38 views

postgres shell keeps hiding the information

When using psql, \d <table> or select * from XXXX, after I exit and go back to shell, the information is not there and I need it to do the next command all the time. This is very very annoying. ...
2
votes
1answer
84 views

Monit “is alive” check of PostgreSQL tends to fail during a run of pg_dump, is there a better way?

I use pg_dump for my primary backup, once every three hours. I also use monit. When monit checks if PostgreSQL is alive during the pg_dump run, it sometimes times out, and restarts postgres. This ...
0
votes
1answer
925 views

pg_dump: [archiver (db)] connection to database failed: FATAL: Peer authentication failed for user “postgres”

I'm trying to backup my Postgres DB to another server but I keep getting denied access. my pg_hba.conf file looks like this: # DO NOT DISABLE! # If you change this first entry you will need to make ...
-1
votes
1answer
266 views

Unable to login in phpPgAdmin

I am trying to login to phpPgAdmin from a remote client. I've created the user root, but when I login phpPgAdmin returns an error message saying "Unable to login" When I check the log it says: ...
-1
votes
2answers
349 views

Postgresql pgdump script on RHEL5: “failed: fe_sendauth: no password supplieddatabase ”

What I'm trying to accomplish is having a pg_dump script run as a cron job. Right now I'm just trying to get the script to run by invoking it myself at the command line. I've searched the postgresql ...
0
votes
1answer
154 views

SSH tunnel to a postgres database [closed]

Currently I develop on a remote dev server. I SSH into the dev server (using SSH keys) as ssh -p 22222 user@devbox.com Then from the dev server, I connect to the database over the local network ...
2
votes
0answers
210 views

Postgres roles best practice implementation

Folks, I could use your help making my Postgres user access control design better and more aligned with best practices. I'm helping roll out a small production Postgres server but I am not a DB ...
-1
votes
1answer
65 views

I'm able to login via “psql” as “posgres” with any linux user - is this a security issue?

I used sudo su postgres and set up my database while logged in as the linux user postgres. After exiting to my normal shell, logged in as my non-root user, I can simply use psql -U postgres and then ...
1
vote
1answer
369 views

postgres server works on LAN but not WAN (connection refused)

I'm trying to set up a postgres server, but I cannot access it through the Internet. It works fine on my LAN. Server is just a desktop computer using Ubuntu 12.04 desktop. disclaimer: I am not ...
2
votes
1answer
105 views

psql asks for password despite configuring trust authentication from localhost

In /var/lib/pgsql/9.1/data/pg_hba.conf, I have the following: # TYPE DATABASE USER ADDRESS METHOD host all all 127.0.0.1/32 ...
0
votes
1answer
734 views

Cannot access psql after installing postgres

I installed postgresql via homebrew on my 10.7.3. The install seemed successful and I was able to start up the server. However when I try to access psql I get the following error: psql: FATAL: role ...
0
votes
2answers
44 views

Database not browsable during COPY on PostgreSQL

When using COPY to restore a CSV file, phppgadmin shows that the real database size(4GB) but when I choose to browse the table it shows Estimated row count to 0. I did a VACUUM ANALYZE. simple SELECT ...
0
votes
1answer
151 views

ssl handshake failure with COPY on PostgreSQL

I'm restoring a CSV file to database with COPY command. The csv file is bziped. I use this command: bunzip2 -c -d online-20110923000001.csv.bz2 | psql -U user -h 127.0.0.1 -d testdb -c "COPY data ...
0
votes
1answer
440 views

Using psql with two postgresql installations on Windows 7

I have installed two versions of Postgresql, 8.4 and 9.1. When I try to run psql it only picks up the previous psql version. For example, when I run the following line to connect to the database, ...
2
votes
3answers
3k views

How can I show the content of a trigger with psql?

I know I can list the triggers with \dft. But how can I see one concrete trigger? I want to know details like on which events the trigger is executed, which function is executed and so on.
0
votes
0answers
246 views

psql on putty shows no output

I am using Windows Vista with Cygwin running on a PUTTY console. When I issue the command "psql -l -U grants -W", there is no output (i.e. no prompt for the password even): But echo works ok.. Fri ...
0
votes
0answers
293 views

Can't connect to PostgreSQL with PHP in Fedora

My PostgreSQL is running properly and I can access it via terminal. phpinfo() gives following information regarding the installation: pdo_pgsql PDO Driver for PostgreSQL enabled PostgreSQL(libpq) ...
1
vote
2answers
310 views

ssh connection interrupted while interactive psql running command--will command finish? Can I reconnect?

I was using interactive psql to run a reindex on one of our databases. Unfortunately, the ssh connection dropped while the reindex was still running and I had foolishly not put psql inside a screen ...
1
vote
1answer
260 views

PSQL error with restarting postgres in SSL

I set up server.crt, root.crt and servery.key in postgresql (using http://howtoforge.com/postgresql-ssl-certificates for instructions), set ssl = on and restarted the service successfully. However, ...
0
votes
1answer
396 views

Problem with diacritics on psql 9.0 (PostgreSQL)

I have two instances of PostgreSQL installed on my server: 8.3 and 9.0. There seams to be some problem with Polish diacritic characters (like ółęąśżźć) on postgresql 9.0 client - psql. When I connect ...
0
votes
2answers
1k views

psql empty database before restore

I want to restore a database of postgreSQL, but before do it i need to empty the restore target database. Is there an option of psql to do it ? Now i use a command line as the following : psql -U ...
1
vote
3answers
616 views

Why does psql attempt to connect with a different username when run from a Perl script

I have a bunch of Perl scripts that have recently stopped working. I have narrowed the problem down to this: when I connect to a postgresql database from a perl script, it attempts to use the wrong ...
0
votes
4answers
2k views

PostgreSQL 8.4 won't start after blackout

I have problem with starting PostgreSQL 8.4 on Ubuntu 9.10 Server after blackout. When I try to connect to the database it says: psql: server closed the connection unexpectedly This probably means ...
7
votes
2answers
1k views

Postgres: Non zero exit code when executing a sql file?

I am writing a shell script which makes calls to psql using 2 forms... one is by command (-c), the other is by file (-f). e.g. psql -c "create table foo (bar integer)" psql -f foobar.sql One ...