PostgreSQL, often simply Postgres, is an object-relational database management system (ORDBMS) available for many platforms including Linux, FreeBSD, Solaris, Microsoft Windows and Mac OS X.

learn more… | top users | synonyms

10
votes
1answer
359 views

Why does `postgres` require a shell?

In my Debian Wheezy systems, I noticed that the postgres user 'postgres', the "PostgreSQL administrator", uses /bin/bash as shell. However, I cannot figure out why this is needed. Changing this to ...
6
votes
4answers
1k views

Choosing Linux Distro for PostgreSQL

I'll begin by saying I'm a newbie sys admin. I need a new PostgreSQL 9.1 machine. My go to distro is Debian (for no good reason other than it's what I first learned). However, when I started ...
6
votes
3answers
280 views

Passwords for newly created users?

I am fairly new to Linux and I have question regarding users. When I use the useradd command I don't specify a password. I must use the passwd command afterwards. Does this mean that the user is ...
6
votes
3answers
490 views

How can I build and install PL/R as a non-privileged user?

There is a postgres instance, and I have the ability to build my own instance. Using these instructions I ran: USE_PGXS=1 make which worked but then USE_PGXS=1 make install did not, with this ...
5
votes
5answers
7k views

pg_dump version mismatch on Debian

I'm running PostgreSQL on Debian Unstable/Sid. I've got the current versions (9.1) of postgresql, postgresql-client, postgresql-client-common (143) installed. The problem I'm having is trying to run ...
5
votes
2answers
3k views

How to install PostgreSQL 9.3 in FreeBSD jail?

I configured virtual NICS using pf, and a jail for FreeBSD using qjail create pgsql-jail 192.168.0.3. When I tried to install PostgreSQL 9.3 using port collection, it shows strange message at first. ...
4
votes
1answer
60 views

unable to connect to forwarded port over ssh

I have two servers. Server 1 has access to an Oracle instance on a server I have permission to hit but not login to via SSH. I would like to use SSH port forwarding to connect from server 2 to server ...
4
votes
1answer
622 views

How do I pg_upgrade my database on Arch Linux?

I was running postgres 8.4 on arch but now have 9 installed I want to use pg_upgrade to upgrade but I don't know what all the options I have to use are, and all the directories that I have to point it ...
3
votes
3answers
2k views

How to solve the problem of PostgreSQL service doesn't start?

This is about Metasploit Framework. root@kali:~# service postgresql start [....] Starting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log ...
3
votes
1answer
491 views

Upgrade Minor Version of Postgres in Debian using apt

I'm trying to move from 9.1.3 to 9.1.4. I thought all I had to do was "apt-get update" and "apt-get upgrade", but that didn't work. It did install some updates, but that was only for 9.1.3. Any ...
2
votes
2answers
273 views

What network protocols do database servers use?

I have a postgres 9.1 server running on the default port 5432 on an ubuntu 12.04 cloud server. I want to open up the port so I can make remote queries -- but I have to open the port on IP tables, ...
2
votes
2answers
2k views

Incremental backup of postgresql database

We run a database server running PostgreSQL with database size of around 130GB growing at a rate of 500MB per day. We use HP Data Protector software to take backups of the database. The issue here is ...
2
votes
1answer
461 views

/etc/rc.d/postgres start vs rc.d postgres start

What's the difference between those two commands? /etc/rc.d/postgres start and rc.d postgres start Aren't those interchangeable? I tried starting PostgreSQL using the latter, but it only works ...
2
votes
2answers
372 views

Logic behind Postgres binary installation path on Debian

It appears that the Postgresql installation is split into three folder locations on Debian: Configuration: /etc/postgresql Binaries: /usr/lib/postgresql Data: /var/lib/postgresql I ...
2
votes
1answer
2k views

How to write a Shell Script using the condition from a database

Consider this is the condition I need to check select count(*) from nm.table1 where column1 =true; Now it should come out of the db (PostgreSQL) and use IF THEN ELSE LOOP in the Unix Something ...
2
votes
2answers
4k views

postgresql service start issues

I'm attempting to build a box via Fabric on Openstack. Part of the install involves installing and running PostgreSQL. This command works fine: $ sudo service postgresql initdb This command ...
2
votes
1answer
2k views

Postgresql wont start after reboot. Kali linux Raspberry Pi 2 [duplicate]

I have been trying for days to get postgresql to work and it did briefly before a restart. How to I set the correct permissions? This is the error I get when I try to start the service after a reboot. ...
2
votes
1answer
137 views

Command-line editing and wrapping

When entering long queries into the command-line psql, my terminal[1] is not wrapping the input line correctly. Additional charactes wrap back to the left of the screen, but on the same line as the ...
2
votes
1answer
350 views

Is it possible to import vmail folder from old iRedMail to new iRedMail installation?

Basically, what I did: Copied vmail folder to my local machine. Reinstalled my VPS. Installed iRedMail again. Created same users on the same domain. Question is - can I somehow copy over my old ...
2
votes
1answer
554 views

Running a query without the OS cache

I want to emulate a client site who doesn't have much caching because they have so much I/O all the time. I want to run a SQL query on my machine (on my VM to be precise) with the same limitations ...
1
vote
1answer
245 views

How do I time how long my pg_restore takes in the command line?

I'm trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the ...
1
vote
1answer
46 views

What does exit code 130 mean for postgres command?

When attempting to start PostgreSQL server using the /usr/pgsql-9.2/bin/postgres command I get an exit value code of 130. However I could not find any documentation for the exit codes of this ...
1
vote
2answers
4k views

Can't install PostgreSQL 9.2 on Linux Mint

I'm new with Linux systems. I tried to install PostgreSQL 9.2. I did the following: sudo apt-get update sudo apt-get -y install python-software-properties sudo add-apt-repository ppa:pitti/postgresql ...
1
vote
2answers
206 views

How do I specify which version of a program to run?

Here's my situation: I have two versions of postgres installed, and with the two versions, come two different psql interactive terminals. One is located at /usr/bin/psql, and starts when I run # ...
1
vote
1answer
34 views

File/directory not being deleted?

Please see the screenshot. The image on the left says existing x installation found at /opt/x The image on the right shows the terminal where I attempt to delete the same directory. The terminal on ...
1
vote
3answers
1k views

CentOS 5: My Postgresql server version is different with my psql client. What should I do?

I installed PostgreSQL 9.1 in CentOS 5 x86_64 VPS, with these following commands: I specified which Postgresql version I'd like to install, so I choose 9.1 because I want to equate between ...
1
vote
1answer
3k views

Cant get remote access to PostgreSQL

There is PostgreSQL 9.2 in Debian. My /etc/postgresql/9.2/main/postgresql.conf file contains: listen_addresses = '127.0.0.0, 212.49.109.137' password_encryption = on '212.49.109.137' is the IP of ...
1
vote
1answer
1k views

Install postgresql 9.2 on debian wheezy (on virtualbox)

I have virtualbox with Debian Wheezy. I'm trying to install Postgresql 9.2 on it. When I trying do it by this instruction i have next: Reading package lists... Done Building dependency tree Reading ...
1
vote
2answers
139 views

Find all postgresql and mysql databases on a system

Is there a way to find all postgresql and mysql databases on my system? (Perhaps using the find command).
1
vote
1answer
418 views

Postgres: authenticate as postgres user in non-interactive script

I am writing a non-interactive script that needs to execute postgres commands. The script will only be run by root or a user with sudo permissions, and the postgres commands need to be executed as ...
1
vote
3answers
2k views

Installing PostgreSQL 9.0 on RHEL 6.4 (How to get Yum to Include a version of OpenSSL I built from source)

I receive the following errors from yum install postgresql90-server: Error: Package: postgresql90-9.0.15-1PGDG.rhel6.x86_64 (pgdg90) Requires: libssl.so.10(libssl.so.10)(64bit) Error: Package: ...
1
vote
1answer
68 views

how to configure postgresql to log in remotely and locally

In order to be able to connect to my postgresql database from another machine, I had to configure my postgresql.conf file like so: ...
1
vote
2answers
1k views

Saving all incoming messages into a database with Postfix?

Is there some plugin for Postfix that can allow you to save all incoming messages into a relational database (PostgreSQL)?
1
vote
1answer
459 views

PostgreSQL on FreeBSD - 'Kerberos 5 authentication not supported'

I've been trying to get a FreeBSD machine to talk to a networked postgreSQL database. I assumed that the machine had kerberos installed, as it's what I use to log in, and I was told that FreeBSD has ...
1
vote
2answers
158 views

Permanently change permissions of /var/run/postgresql

On Linux Mint 17.0 Cinnamon Edition, I want to use /var/run/postgresql as the unix_socket_directories option for all of my postgres databases. Whenever I run the command pg_ctl -D postgres-data -o ...
1
vote
0answers
148 views

GitLab install: psql error “role ”git“ does not exist” [closed]

I'm new to Unix administration. I have a virtual machine with FreeBSD 10.1 and I would like to install GitLab. I used this guide to install it, but on step 4 it doesn't work: ...
1
vote
0answers
1k views

ERROR: Failed to build gem native extension on Arch (postgresql)

I can't install gem pg on Arch due to the error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/alex/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb checking for ...
1
vote
0answers
1k views

Postgresql 9.1 - Kali Linux

I start to read this book : http://www.amazon.fr/Metasploit-The-Penetration-Testers-Guide/dp/159327288X And i have some trouble in using postgresql 9.1 (in Kali Linux). When i start msfconsole, i ...
1
vote
0answers
347 views

PostgreSQL installation error in debian

I'm trying to install PgSql in the system with following specs: Distributor ID: Debian Description: Debian GNU/Linux 7.1 Release: 7.1 x86_64 But I am getting an error like this The ...
1
vote
1answer
2k views

Kali Linux Postgresql Error

I recently installed kali Linux and keep getting an error code starting metasploit this is the code [...] Starting PostgreSQL 9.1 database server: main [...] Error: could not exec ...
1
vote
0answers
69 views

Add Solaris utf-8 support for Postgresql

I need to use utf-8, but "locale -a" produces: C POSIX iso_8859_1 the os is: SunOS cteraportal 5.11 NexentaOS_134f i86pc i386 i86pc Solaris Additional info: root@cteraportal:~# dpkg -l locales ...
1
vote
0answers
452 views

Passing escape sequences to shells within ansi-term in Emacs

In a regular terminal (e.g. iTerm2 on OS X) I can connect to a database, e.g. > psql .... and then, as I type my command in psql, e.g. $ select foo from bar I can move around (as I type psql ...
1
vote
0answers
146 views

Postfix, postges courier-imap / relay reject error on gentoo

I followed a guide to put together a server https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server it went smooth with no real headaches. First domain works like a champ but adding a second domain, ...
1
vote
0answers
181 views

Firewall config prevents hibernate connecting to postgres in CentOS6.3

I have an operating environment in CentOS 6.3 that has tomcat7 and postgres9.2 installed. There is just one web application deployed in tomcat that tries to establish a connection from localhost to ...
1
vote
1answer
188 views

Change default python distribution for postgres from the system's python (to Enthought Canopy)

On an RHEL6 system, I'd like my postGIS implementation (ie my postgres/postgresql databases) to use Enthought's Canopy distribution of python, rather than the built-in GNU's distribution. (This is ...
1
vote
0answers
1k views

“No PostgreSQL user name specified” - possible concurrency issues?

For my dissertation I'm running the same cronjob on around 300 machines, which is: 10,25,40,55 * * * * /path/to/db_script.sh 1>/dev/null This script gets some values from the system (whether ...
1
vote
1answer
206 views

pgbouncer startup problem

I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup. When I start pgbouncer, I get the error Cannot open logfile: ...
0
votes
2answers
42 views

Is there an easy foolproof way to translate commands from Ubuntu to Debian, and vice-versa?

If I want to work between Ubuntu and Debian or switch to one or the other, would there be a good way to know what commands will work on both? I have set up Debian with sudo (i.e. by not choosing a ...
0
votes
1answer
34 views

Systemd postgresql start script

I'm in the process of installing postgresql onto a second server Previously I installed postgresql and then used the supplied script ./contrib/start-scripts/linux Placed into the correct dir # cp ...
0
votes
1answer
46 views

How to restore the user postgres?

In the second answer in this thread is a warning about changing the UNIX password for "postgres". I have already changed the password for "postgres". How could I restore the initially state of the ...