Questions tagged [postgresql]

PostgreSQL is a powerful, open source object-relational database system.

PostgreSQL offers many advantages for your company or business over other database systems.

689 questions
209
votes
8 answers

How do I find the path to pg_hba.conf from the shell?

I would like to obtain the path to pg_hba.conf from the shell. The path varies between versions of PostgreSQL. For instance, for 8.4 and 9.1: /etc/postgresql/8.4/main/pg_hba.conf /etc/postgresql/9.1/main/pg_hba.conf I have tried the pg_config…
Roger Dahl
  • 2,282
192
votes
3 answers

How to install psql without Postgres?

I need the psql command line tools, but I don't need the actual Postgres RDBMS. This is to work with a package which supports a psql interface. Is it possible to install just psql? (Ubuntu 16.04)
175
votes
5 answers

How to remove Postgres from my installation?

I have ubuntu 9.10(karmic), and when I attempted to install a new program, the postgres was installed as a dependency of that program, no problem at all if the installation occurs with success, but there was an error, and the Postgres was not…
devasia2112
  • 1,909
119
votes
4 answers

How to install pgAdmin 4 in desktop mode on Ubuntu

How to install pgAdmin 4 in desktop mode? The documentation only details server mode.
Victor
  • 9,244
116
votes
27 answers

Can not connect to PostgreSQL listening on port 5432

I installed the Bitnami Django stack which included PostgreSQL 8.4. When I run psql -U postgres I get the following error: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections…
Assaf Lavie
  • 2,223
99
votes
4 answers

How do I install PostgreSQL 9.6 on any Ubuntu version?

How do I install PostgreSQL 9.6 on any Ubuntu version since it doesn't come by default with the most recent version? Ubuntu Xenial (16.04) comes with PostgreSQL 9.5 from the default repositories.
Victor
  • 9,244
95
votes
7 answers

What is the difference between "service restart" and "service reload"

I'm trying to understand the difference between service restart [someservice] and service reload [someservice]. I understand that restart restarts the service whereas reload reloads the configuration. But I don't understand the practical…
nxzr
  • 1,053
66
votes
2 answers

Command pg_dump not found?

I was trying to make a backup in a server and I got the error: pg_dump command not found I thought that if you had postgres installed, it worked. What I have to do to install this command? I do not think that it is possible with apt-get or…
forvas
  • 865
57
votes
6 answers

Remotely access postgresql database

I need to access a postgresql database from a remote machine on a VPS at DigitalOcean running 12.10 and postgresql 9.1. How do I do this? I noticed port 5432 is closed, how do I open this?
57
votes
3 answers

pg_ctl: command not found, what package has this command?

I have installed pgadmin using the ubuntu software center and am trying to access a local database (recently downloaded from the internet). I have tried to run the pg_ctl command (running as postgres) however this gives a command not found error. I…
Thijser
  • 1,101
  • 2
  • 14
  • 39
54
votes
4 answers

What is a masked service?

I would like to understand what a masked service is and how to unmask it if need be. I have been trying to start PostgreSQL on Ubuntu 16.04-LTS using the command systemctl start postgresql.service. Both as a user with administrative privileges, as…
Joseph-L-S
  • 1,113
48
votes
4 answers

how to nicely stop all postgres processes

How do you nicely stop all postgres processes with pg_ctl (or otherwise), when you don't recall what the database directory is, nor have the PGDATA environment variable defined?
matanox
  • 1,861
47
votes
3 answers

Postgres password authentication fails

I've installed PostgreSQL 9.1 and pgadmin3 on Ubuntu Server 13.10. I configured postgresql.conf with: listen_addresses = '*' also I configured ph_hba.conf by changed peer connections to md5 Plus I reset the password of postgres by: sudo password…
Shadin
  • 1,237
43
votes
4 answers

Stopping a postgresql instance

For the sake of educational purposes I have two identical instances of postgresql running on my machine. I can easily stop the service of the instance that is running on port 5432 like this : sudo service postgresql stop What I like to know is…
Beatles1692
  • 535
  • 1
  • 4
  • 7
36
votes
1 answer

Postgres doesn't have hstore extension

I was trying to run the following command but i threw me any error. template1=# CREATE EXTENSION hstore ERROR: could not open extension control file "usr/share/postgreesql/9.2/extension/hstore.control": No such file or directory It seems like I…
CYC0616
  • 463
1
2 3
45 46