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

learn more… | top users | synonyms

34
votes
5answers
136k views

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/...
32
votes
6answers
31k views

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 ...
30
votes
1answer
17k views

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....
27
votes
3answers
27k views

How do I migrate my postgres data from 8.4 to 9.1?

I have upgraded my ubuntu development machine from 11.04 to 11.10. In the process my postgres was also upgraded from 8.4 to 9.1. But I seem to have lost all my data. If I look, I can see that my data ...
18
votes
7answers
37k views

How to install PostgreSQL on Ubuntu 13.04?

How to install PostgreSQL in Ubuntu 13.04? I followed by this tutorial, How to install postgreSQL 9-2 - UbuntuGeek.com But in logs it says: the package is deprecated and no longer will be used ...
18
votes
2answers
32k views

How to fix PostgreSQL installation

I upgraded from Maverick to Natty recently and everything went fine except during the dist-upgrade something went wrong with PostgreSQL. I've since tried reinstalling, removing, and even purging it ...
17
votes
3answers
38k views

How do I upgrade to Postgres 9.2?

Just recently, I've read that PostgreSQL 9.2 is released. My Ubuntu 12.04 has PostgreSQL 9.1.5 installed. How can I update to 9.2 version? I tried apt-get update and apt-get upgrade but no updates for ...
15
votes
1answer
7k views

How do I set which PostgreSQL version is to be used by default?

I have 2 different versions of PostgreSQL installed on my system (Ubuntu Lucid): /var/lib/postgresql/8.4 /var/lib/postgresql/9.0 By default, when I run a PostgreSQL command such as createdb or ...
14
votes
3answers
69k views

How do I install pgAdmin III for postgreSQL 9.2?

I have a Windows server that runs postgresql 9.2. I want to hit it using pgAdmin III from my Ubuntu 12.10 workstation box. I installed pgAdmin III from synaptic and also tried direct download from ...
14
votes
3answers
24k views

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) ...
13
votes
4answers
21k views

PHPPgAdmin not working in Ubuntu 14.04

After a fresh install of Ubuntu 14.04, I've installed postgresql and phppgadmin from the Ubuntu repos. I am using the Apache2 webserver. PHP is working fine in the webserver, as is PHPMyAdmin, but ...
13
votes
5answers
19k views

Problem Installing and configuring PostgreSQL

I am a newbie here and to the server administration. A couple of days back I have registered a server with Hetzner with Ubuntu 11.04. I intend to work with PostgreSQL, for which I have installed ...
12
votes
2answers
26k views

Where is a postgresql 9.1 database stored in ubuntu 12.04?

I installed and created a Postgresql database on ubuntu. I then created the database using the following command: sudo su postgres createdb mydatabase However, I can't figure out where the database ...
12
votes
2answers
30k views

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?
10
votes
2answers
13k views

rails & libpq-dev nasty dependencies

I don't know if this question belongs here, but I'll take a shot. Hi. I'm running ubuntu 11.10 dual-boot with windows vista on my machine. On Ubuntu, I've installed RVM, rails gem, & PostgreSQL (...
10
votes
2answers
43k views

Installing pgadmin 3 for Ubuntu 11.10 and postgresql 9.1

I've installed pgadmin3 on a remote ubuntu client and succesfully connected to the postgres db using: sudo apt-get install pgadmin3 Problem is that when connecting to the postgres 9.1 server it ...
9
votes
3answers
18k views

How install postgresql 9.4

After trying apt-get install postgresql-9.4, updating, trying again etc etc. It seems I can't install it: Couldn't find any package by regex 'postgresql-9.4' I know there is a similar question in ...
9
votes
3answers
9k views

PostgreSQL 9.1 adminpack install

everywhere I see guides for postgre, it seems to be on version 8.4. In that case the instruction is: sudo -u postgres psql < /usr/share/postgresql/8.4/contrib/adminpack.sql that location doesn't ...
9
votes
4answers
13k views

install postgres 9.4 on ubuntu 14.04-2 [duplicate]

I need to install postgresql 9.4 server but I only can find version 9.3. wit apt. How can I install or upgrade it?
9
votes
1answer
11k views

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?
9
votes
2answers
5k views

What is the easiest way to install PostGIS?

What is the easiest way to install postgis on Ubuntu Server 11.10? apt-get install ...
7
votes
3answers
19k views

Install postgresql. Why is initdb unavailable?

I'm following these instructions, however I can only get to step 17.2. Despite installing postgresql successfully via the sudo apt-get install postgresql command, upon running initdb -D /usr/...
7
votes
3answers
31k views

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 ...
7
votes
1answer
4k views

Postgres-xc won't uninstall (Fails on Stopping Co-ordinators)

I was doing some rails development and accidentally installed postres-xc instead of the normal postgres package. I immediately went to remove postgres-xc, but apt-get will not uninstall it. I also ...
7
votes
2answers
5k views

Postgis + could not access file “$libdir/postgis-2.1”: No such file or directory

I am running postgresql9.3 and postgis2.1 , it works fine. When i installed QGIS by using the following commands: sudo apt-get update sudo apt-get install qgis After installing QGIS the postGis is ...
6
votes
1answer
18k views

Starting PostgreSQL server, postgres user unknown

I am trying to start a PostgreSQL server (9.3) on Ubuntu 14.04. I am following this standard tutorial: https://help.ubuntu.com/community/PostgreSQL After updating to from 13.10 to 14.04 I purged the ...
6
votes
3answers
6k views

How to manually restart services affected by apt upgrades?

How can I issue apt upgrades without automatically stopping/starting daemons? I'd like to manually restart services. To cite a specific example: I'll revisit a long-running machine and run sudo apt-...
6
votes
2answers
3k views

Where can I get a Postgres 9.0 package?

I want to use Postgres 9.0 in Ubuntu. Does anybody know any repository that already has the debian package for Postgres 9.0? Do you think I should wait for the next Ubuntu release or Postgres 9.0 is ...
6
votes
2answers
963 views

Why is there a shell given to user for PostgreSQL?

cat /etc/passwd |grep postgre postgres:x:115:127:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash apt-cache show postgresql Package: postgresql Priority: optional Section: database ...
6
votes
3answers
11k views

pgadmin3: Unable to initialize gtk, is DISPLAY set properly? [closed]

I'm having some trouble getting pgadmin3 to run on a remote server. I'm logging in to the server using SSH with the -X option. When I first installed pgadmin3, I was able to launch it using the ...
6
votes
1answer
3k views

How do i install postgresql-8.3?

I get > sudo apt-get install postgresql-8.3 Reading package lists... Done Building dependency tree Reading state information... Done Package postgresql-8.3 is not available, but is referred ...
5
votes
4answers
37k views

Uninstall an specific version of PostgreSQL

I have Postgresql 9.1.1 in my Ubuntu 12.04 which got installed due to automatic upgrades and whenever I uninstall it using the command: sudo apt-get --purge remove postgresql-9.1.1 I get an error ...
5
votes
2answers
4k views

apt-get upgrade stuck on postgresql dependency

I ran sudo apt-get upgrade on my 12.04 server, and I have become stuck with a PostgreSQL dependency. The console output (of sudo apt-get -f install) is below: dpkg: dependency problems prevent ...
5
votes
2answers
4k views

How to make Postgres start automatically on boot

I am new to Ubuntu and I would like to know how to make postgresql start automatically on boot and how to configure my setup so that I can start the postgres server if need be. I am working on a ...
5
votes
1answer
798 views

Why isn't the new “postgres” user I created showing up in User Accounts?

I just did a fresh install of Ubuntu 12.04 on a Dell Inspiron 1545, then downloaded & installed all the latest updates. Now when I create a new user postgres in the "User Accounts..." window, it ...
4
votes
5answers
24k views

Can't uninstall postgresql package due failing to start service?

I simply don't understand what's going on. sudo apt-get remove postgresql results in: Reading package lists... Done Building dependency tree Reading state information... Done Package '...
4
votes
2answers
4k views

How to uninstall PostgreSQL installed from .run file?

I am a new Ubuntu 12.04 user and I'm using 64bit. This morning I installed Posgresql 9.2 from the graphical installer (not from Ubuntu repository) . Now I want to uninstall it, but I don't know how. ...
4
votes
1answer
358 views

Using Expect in Bash to set the inital “postgres” user password?

Following the tutorial here: http://www.unixmen.com/install-postgresql-9-4-phppgadmin-ubuntu-14-10/ I am scripting the installation of PostgreSQL in bash but having a problem when it comes to setting ...
4
votes
2answers
2k views

pgadmin III doesn't work due to “The server lacks instrumentation functions.”

When pgAdmin III is used to open a PostgreSQL database the following message appears. There does not seem to be any obvious package listed in the Ubuntu Software Center for this. The server lacks ...
4
votes
3answers
4k views

Does postgresql (server) setup a main cluster after installation? (14.04)

I'm surprised that installing postgresql on ubuntu doesn't give me a working postgres server setup immediately: it requires additional steps: Setting up postgresql-common (154) ... * No PostgreSQL ...
4
votes
2answers
4k views

How do I downgrade PostgreSQL?

In my ubuntu 12.04 x64 I installed PostgreSQL 8.4. It got automatically upgraded to 9.1.1. Due to some inconsistencies, I want to downgrade it to 8.4. How can I do this using the terminal?
4
votes
0answers
240 views

How to uninstall specific versions of Postgres?

On Ubuntu 14.04 I have done this to get the latest postgres: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget -...
3
votes
3answers
65k views

The following packages have unmet dependencies!

I am writing this because I am very confused about installing postgresql 9.3 on mine Ubuntu 14.04. First I need it for mine Python/Django development, and I ran in to the problem, when i tried to ...
3
votes
1answer
2k views

Does libpg-java support passwordless login? [closed]

The following command runs fine, that is, doesn't ask for a password, prints no warnings or errors, and simply provides a DB prompt: $ psql -U dbuser dbname psql (8.4.10) Type "help" for help. ...
3
votes
2answers
9k views

How can I update pgadmin3 to v1.14?

I installed Ubuntu 11.10 yesterday. From the repos I installed postgresql and pgadmin3. postgresql 9.1 is the current version but it seems pgadmin3 v1.12 is not properly compatible with 9.1. How can ...
3
votes
2answers
4k views

APT tries to configure PostgreSQL each time I try to install a package

I'm getting some strange errors lately whenever trying to apt-get install anything. Here's an example from trying to install fluidsynth. $ sudo apt-get install libfluidsynth1 Reading package lists......
3
votes
2answers
279 views

Will apt-get dist-upgrade blow away my PostgreSQL server setup?

I'm about to upgrade my webserver, my site relies heavily on PostgreSQL database and settings. I started apt-get dist-upgrade, and it says it wants to upgrade Postgres. I cancelled, but will it wipe ...
3
votes
1answer
2k views

I'm trying to install postgresql on 12.04, and it's just not working

I've got a new installation and I'm trying to get Postgresql working. The database was installed and I started a restoration from a dump on another machine, but that ran into problems because I had ...
3
votes
2answers
6k views

Run a PostgreSQL instance locally

I'm trying to follow this tutorial, but at the beginning it says to run a postgresql instance "locally" instead of as a daemon using the following commands. $ initdb pg $ postgres -D pg & $ ...
3
votes
1answer
824 views

Installing postgres removes rabbitmq and vice versa. How to make both stay?

I need both rabbitmq-server and postgresql to be installed on my machine and apt-get installing one removes the other. Here is the output from install commands: $ sudo apt-get install postgresql ...