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.

1970 questions
145
votes
6 answers

How to see active connections and "current activity" in PostgreSQL 8.4

I'm investigating an issue with DB connections being left open indefinitely, causing problems on the DB server. How do I see currently open connections to a PostgreSQL server, particularly those using a specific database? Ideally I'd like to see…
EMP
  • 5,162
44
votes
2 answers

postgres server fails to start, produces no log, how to to troubleshoot?

I'm starting up a postgres 9.3 instance on a ubuntu 12.04 server : ~# service postgresql start * The PostgreSQL server failed to start. Please check the log output. [fail] the…
Max L.
  • 561
33
votes
6 answers

How to restore PostgreSQL database from .tar file?

I have all PostgreSQL databases backed up during incremental backups using WHM, which creates a $dbName.tar file. Data is stored in these .tar files, but I do not know how to restore it back into the individual databases via SSH. In particular the…
Stephen
  • 901
32
votes
5 answers

How do I upgrade postgresl database? Incompatibility error

I installed postgresql via Homebrew. I have the following issue after upgrading: FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.0, which is not compatible with this version…
30
votes
4 answers

Is PostgreSQL suited to one OS? Is it better on Linux than Windows?

I have been running PostgreSQL on Windows Server 2003 without a hitch and its fast, so to answer my own question it seems fine. However I am about to launch a new project and am considering using a Linux box instead as stability and performance are…
user55029
27
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…
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.
20
votes
4 answers

PostgreSQL ERROR: no more connections allowed

How do you free up PostgreSQL connections that aren't properly being closed by client applications? I have a data-mining app that spins up multi processes, all connection to a local PostgreSQL 9.1 database to retrieve data. It runs fine for a few…
Cerin
  • 3,650
  • 20
  • 63
  • 79
18
votes
4 answers

EXPLAIN with index suggestions

Is there any (preferably open source) software than can analyze a PostgreSQL EXPLAIN, and recommend the necessary indices that would speed up the query?
Adam Matan
  • 13,574
15
votes
3 answers

Postgres - could not create any TCP/IP sockets

I'm running a rails app in development with postgresql 9.3. When I tried to start passenger server today, I got: PG::ConnectionBad - could not connect to server: Connection refused Is the server running on host "localhost" (217.74.65.145) and…
Jacka
  • 255
15
votes
3 answers

call multiple Sql files in a single SQL file in Postgres

How do call multiple sql files in a single sql file, in postgres For example I have aaa.sql, bbb.sql, ccc.sql. I want to execute this 3 files from xxx.sql. Can anyone suggest me how to do this.
Trip
  • 411
15
votes
1 answer

How to install a PostgreSQL client

I have a PostgreSQL server setup on Box A. I want to connect to the server from Box B using psql. What do I need to install on Box B? I can't find a client installation binary for PostgreSQL. Or do I have to install the entire PostgreSQL…
14
votes
2 answers

Postgresql Provided user name and authenticated user name do not match

I am trying to get tinyRSS running on my own server using PostgreSql. However I keep getting this error: LOG: provided user name (tinyrss) and authenticated user name (apache) do not match FATAL: Peer authentication failed for user "tinyrss" I…
Hong Yi
  • 299
14
votes
2 answers

postgresql log queries single database

I'm using PostgreSQL (8.3) with multiple databases... I'm wondering if there is some way to log the queries made only in one of the databases (not all of them). Or to have one logfile per database... I know I can use log_line_prefix = "%d" to log…
arod
  • 602
13
votes
1 answer

How can I have timing default to on with postgresql?

I'm using the psql client on a linux machine, and I always want timing to be on. Is there a config file or setting somewhere to do this? I am currently always starting my session with: \timing
lanrat
  • 747
1
2 3
16 17