Questions tagged [psql]

psql is official postgresql client

psql is the official postgresql database client. It provides a command line interface (CLI), and it can be used to establish an interactive session with a postgresql database server and execute SQL queries. It can also be used to import an SQL file and execute it against one of the postgrseql DBs.

50 questions
0
votes
0 answers

I can't get the postgres installation correctly

I have spent quite a bit of time to install postgresql 11 on the high side production, but I just can't quite get it installation and configured correctly after I yum install rpm -i postgresl11-server-11.1-1PGDG.rhel7.x86_64 rpm -i…
Pepe
  • 1
0
votes
1 answer

specifying server port (not postgres port) for pg_dump / psql

I have a server named as servername.mydomain.com. I can do ssh to this server using a port number X using: ssh myusername@servername.mydomain.com -p X From this server I can run: psql -h localhost -d myDatabase -U myusername -p DBPORT Instead of…
Jose Cabrera Zuniga
  • 179
  • 1
  • 3
  • 11
-1
votes
1 answer

Cronjob doesn't run. Similar cronjob does run. Issue with Env Vars??? Fedora involved. psql involved

I have cronjobs like so * * * * * /usr/bin/psql -U usename dbname -c "select usename, now(), pg_terminate_backend(pid) from pg_stat_activity where state like 'idle%' and (now() - query_start) > interval '2 hour';" &>…
artdv
  • 101
  • 1
-1
votes
1 answer

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 do whatever I want with any database, Postgres…
orokusaki
  • 2,763
  • 4
  • 32
  • 43
-3
votes
1 answer

Psql uses .pgpass file however pg_dump does not, and it also does not connect using the correct password

Using the following command: % pg_dump -h postgres.cs.host.ca -p 5433 -n _cscf_subscription -Fc -f ~/old.dump odyssey_prod Password: pg_dump: [archiver (db)] connection to database "cs-rsub" failed: FATAL: password authentication failed for user…
ComputerLocus
  • 193
  • 4
  • 12
1 2 3
4