Questions tagged [postgresql]

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows. It is ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others, and exceptional documentation.

An enterprise class database, PostgreSQL boasts sophisticated features such as Multi-Version Concurrency Control (MVCC), point in time recovery, tablespaces, asynchronous replication, nested transactions (savepoints), online/hot backups, a sophisticated query planner/optimizer, and write ahead logging for fault tolerance. It supports international character sets, multibyte character encodings, Unicode, and it is locale-aware for sorting, case-sensitivity, and formatting. It is highly scalable both in the sheer quantity of data it can manage and in the number of concurrent users it can accommodate.

PostgreSQL has won praise from its users and industry recognition, including the Linux New Media Award for Best Database System and five time winner of the The Linux Journal Editors' Choice Award for best DBMS.

Best of all, PostgreSQL's source code is available under a liberal open source license: the PostgreSQL License. This license gives you the freedom to use, modify and distribute PostgreSQL in any form you like, open or closed source. Any modifications, enhancements, or changes you make are yours to do with as you please. As such, PostgreSQL is not only a powerful database system capable of running the enterprise, it is a development platform upon which to develop in-house, web, or commercial software products that require a capable RDBMS.

1955 questions
27
votes
5 answers

What's the best way to automate backing-up of PostgreSQL databases?

I find it tedious to have to backup databases every week. And I also think weekly backups should be turned into daily backups. If I had to do that, I don't want to do it manually. What's the best way to automate the backing-up of PostgreSQL…
Randell
  • 1,173
  • 8
  • 18
  • 26
27
votes
2 answers

How to change in postgresql password of the user using SQL

How to change in postgresql password of the user using SQL. I have user (alex) and his password (e.g. pass) i need to change using sql statement his password to NULL...
Alexander
27
votes
1 answer

pg_dump backup compression

When executing a pg_dump which should I use and why? pg_dump -U | gzip -c > backup.gz or pg_dump -F c -f backup.tar.gz -U
d4v3y0rk
  • 373
  • 1
  • 3
  • 8
26
votes
3 answers

Postgres: How can I see all SQL statements being executed by the database server?

I'm in the process of reviewing every SQL statement that an application makes against the database, for performance reasons. Is there an easy way to log all statements that are executed by the PostgreSQL database server? Thanks.
Jin Kim
  • 963
  • 2
  • 9
  • 12
25
votes
3 answers

psql: fe_sendauth: no password supplied

I have an up and running PostgreSQL database. Now I would like to automate some operations on my database but I have a problem with the password. I am using the following bash script: #!/bin/bash export PGPASSWORD="postgres" sudo -u postgres psql -d…
alibaba
  • 427
  • 2
  • 6
  • 14
25
votes
4 answers

postgresql installation : initdb data directory not empty?

I am trying to create the postgresql database. When I install PostgreSQL, I gave this command: sudo yum install postgresql postgresql-server and later I modified the config file: sudo vim /var/lib/pgsql/data/pg_hba.conf and modified as local all…
sridhar
  • 253
  • 1
  • 3
  • 4
25
votes
1 answer

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 admin, so I know just enough to be dangerous. There is…
JP Beaudry
  • 361
  • 3
  • 6
24
votes
1 answer

Django: CONN_MAX_AGE persists connections, but doesn't reuse them with PostgreSQL

I've got a django setup are using Django 1.6.7 and Postgres 9.3 on Ubuntu 14.04 LTS. At any given time, the site gets about ~250 simultaneous connections to the PostgreSQL database, which is a Quad Core Xeon E5-2670 at 2.5GHz, and has 16GB of ram. …
synic
  • 793
  • 1
  • 8
  • 13
24
votes
11 answers

Reloading PostgreSQL after configuration changes

I've made some changes to pg_hba.conf and I want them to take affect. I've found several places where people say that I can tell PostgreSQL to reload, but there are several different techniques listed, and none of them work for me yet. The most…
Don Kirkby
  • 1,354
  • 3
  • 11
  • 23
24
votes
5 answers

What's a convenient way to execute multiline queries in postgres using ssh?

Say I need hand write some queries in the console, what's the most efficient way of executing multiline queries like CREATE TABLE statements? I am used to using Microsoft Management Studio, but I now find myself having to learn about PostgreSQL on…
Chad Harrison
  • 6,990
  • 10
  • 29
  • 41
24
votes
2 answers

PgAdmin: could not send data to server: Socket is not connected could not send SSL negotiation packet: Socket is not connected

While opening query tool via pgadmin, i am getting this error on popup. could not send data to server: Socket is not connected could not send SSL negotiation packet: Socket is not connected Does any one know why this is happening.
Bhavesh Tilvani
  • 353
  • 1
  • 2
  • 5
23
votes
6 answers

Ubuntu get PostGreSQL running

I have installed PostGreSQL 8.3 on an Ubuntu machine and I want to configure a pssw for it, however when I run this command: sudu su postgres -c psql template1 I get the following error: "psql: could not connect to server: No such file or…
Tony The Lion
  • 383
  • 1
  • 2
  • 9
23
votes
6 answers

Location of postgresql.conf and pg_hba.conf on an Ubuntu server

Where are the files postgresql.conf and pg_hba.conf on a Linux server running PostgreSQL 8.4 installed from Ubuntu repos?
Oleksandr
  • 391
  • 1
  • 2
  • 8
22
votes
3 answers

Completely reset PostgreSQL to default?

Question Is there a way to completely reset a PostgreSQL installation on Linux, so it is in the same state as when I installed it? Idea I have considered rm -rf /var/lib/pgsql/* rm -rf /var/lib/pgsql/backups/* rm -rf /var/lib/pgsql/data/* but…
Jasmine Lognnes
  • 2,520
  • 8
  • 33
  • 51
22
votes
1 answer

Is it possible that just one bit switches so my file shows me a letter "Q" instead of a "S"

In our application we use Hibernate and PostgreSQL to store data. In one of our database tables we have a discriminator column which says for example "TIPPSPIEL". It is a fixed string and can not be manipulated by any user. Suddenly we had one entry…
Janning
  • 1,421
  • 2
  • 21
  • 38