PostgreSQL is a powerful, enterprise class, open source RDBMS. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability and data integrity. It runs on all major operating systems, including Linux, UNIX and Windows. It prides ...

learn more… | top users | synonyms (1)

2
votes
1answer
65 views

Postgresql subquery speed much slower than individual queries

In Postgres 9.1. I am attempting to do a single query to get the timezone of a given postal code. I have data loaded in my database, and I am using PostGIS to store the coordinates of each postal ...
0
votes
1answer
15 views

Change posgresql 9.3 slave roll password

I need to change the password on my slave posgresql server, because the person who set it up left the password the same as the password for the super user account on our other server. When I run ...
0
votes
2answers
153 views

upgrading from postgres 9.1 to 9.3 on ubuntu server

I have my production server(ubuntu 13.10) running with postgresql 9.1. I want to use few features of 9.3, hence want to upgrade. Could someone help me with upgrading from 9.1 to 9.3 so that there is ...
2
votes
3answers
230 views

How can I generate TPC-DS queries for PostgreSQL?

I'm using TPC-DS to run some benchmarks on a few versions of postgres that I have. I noticed that there is no template for generating the TPC-DS queries with the target database as postgres. The ...
0
votes
0answers
6 views

WAL archiving from a standby backup strategy Postgresql 9.3

I am trying to figure out if wal archiving from a standby is possible and a viable option for a backup strategy on Postgresql 9.3. The idea is to be able to take regular base backups and wal ...
0
votes
1answer
20 views

High volume data aggregation

I need to aggregate incoming data and save the resulting aggregates to a table. A sample of the data is below. id,time 1967,2014-04-12 00:42:55+00 1967,2014-04-12 00:42:51+00 1972,2014-04-12 ...
0
votes
1answer
44 views

While importing 150 GB file on Amazon RDS, why connection is failing?

I am having Postgres database dump file of 150 GB on Amazon EC2 instance. While dumping the data on RDS from EC2 server I am getting error. The output of the command is as given below. It's giving ...
0
votes
4answers
84 views

PostgreSQL 9.3 on Ubuntu Server 12.04 v.s. MS SQL Server 2008 R2 on Windows 7 Ultima

I have searched many articles in Google about the performance of PostgreSQL vs MS SQL 2008 R2 and found that many of those articles say the performance of PostgreSQL is better than that of MSSQL 2008 ...
0
votes
0answers
28 views

Is there a better First() aggregate function in postgresql?

Some context I have been working in a "homemade" backup system for my postgresql (with postgis extention) database. The database is used with a geographic information system software called qgis as ...
0
votes
0answers
49 views

Adding additional condition significantly degrades performance

Have the following query: SELECT * FROM table_A INNER JOIN table_B ON /* conditions */ INNER JOIN table_C ON /* conditions */ INNER JOIN table_D ON /* conditions */ WHERE table_B.state = 'active' ...
0
votes
1answer
28 views

What happens when we call pg_dump while users are still using the system?

We have a web application with PostgreSQL as our database and use celery background tasks for somewhat complex task. At the very beginning of this complex task we take a backup of the database using ...
6
votes
5answers
8k views

PostgreSQL: The database cluster initialization failed

Both C:\PostgreSQL and C:\PostgreSQL\data have postgres user with full access and admin rights. I ran postgresql-9.1.2-1-windows.exe from postgres user as admin. Target C:\PostgreSQL Every way I ...
0
votes
0answers
13 views

Connecting Posgresql server using Pgpool

I am running two postgresql servers on two different linux machine and also running the pgpool-II-93 on the both machine.I simply want to check whether syncing between Databases at different machine ...
1
vote
0answers
27 views

Is there a psql equivalent of bash's reverse-search-history?

I am very fond of bash's reverse-search-history (C-r) (command-line feature): Search backward starting at the current line and moving ‘up’ through the history as necessary. This is an incremental ...
1
vote
2answers
46 views

Returning empty string when string_agg has no records

I am trying to return a text field in a PostgreSQL query that is of the form 'stringOne' || string_agg(field, ',') || 'stringTwo' where for certain elements in the group clause, field is always ...
1
vote
1answer
47 views

Unnest multiple arrays into rows

I have been shown a great way to bulkinsert with this example: WITH p AS ( INSERT INTO parent_table (column_1) SELECT $1 RETURNING id) INSERT INTO child_table (parent_table_id, ...
0
votes
2answers
28 views

postgresql being slow on count distinct for dates

I have a very simple, but very big, table. Its schema is like this (yadda int, yadda1 int, yaddate date, ... other stuff). Now, yaddate has an index by itself and it is also in other indexes ...
0
votes
0answers
19 views

Tool for auditing and managing databse access control lists [on hold]

There is maybe a tool for auding privileges to certain objects in the postgres db, checking password security, checking or public privileges are revoked etc.? A simple script that generates report ...
0
votes
1answer
87 views

Postgres: Estimate of server specs required for write-heavy load?

I'm looking for a rough estimate on what kind of server specs is required for a system that will have 1000 or so concurrent writes. There will be 100+ concurrent reads, but they won't require a ton of ...
4
votes
0answers
28 views

Postgresql JDBC Table Valued Parameters [on hold]

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent in PostgreSQL, if ...
1
vote
1answer
93 views

Difference between now() and current_timestamp

In PostgreSQL, I use the now() and current_timestamp function and I see no difference: # SELECT now(), current_timestamp; now | now ...
0
votes
1answer
42 views

Cannot install Postgres 9.3 on Linux Mint

I am trying to install Postgres 9.3.4 on Linux Mint 16 Petra. In a terminal window, I pasted: blah ~ $ sudo apt-get install postgresql-9.3 The following appeared on the console… Reading package ...
0
votes
1answer
54 views

Database design for small startup

For a small startup that doesn't have much expected traction in the very beginning. We are currently working with only one postgres database without replications and at risk of failures. I've done ...
1
vote
1answer
45 views

Trouble with installing additional modules on Postgresql 9.1 on ALT-Linux

I'm trying to create extension under postgresql 9.1 (Linux): CREATE EXTENSION pg_trgm; but got error: ERROR: could not open extension control file "/usr/share/pgsql/extension/pg_trgm.control": No ...
2
votes
1answer
28 views

How to create function(table_name) that returns a set of the table

I have a set of tables that share the same fields (some timestamps and users names used for version control). I need to create a function with dynamic sql that uses a table_name and a timestamp as ...
0
votes
0answers
17 views

How to pass log file in pg_dump

I am using this command to export. export PGPASSWOD=${PASSWORD} pg_dump –i –b -o -host=${HOST} -port=5444 -username=${USERNAME} -format=c -schema=${SCHEMA} --file=${SCHEMA}_${DATE}.dmp ${HOST} ...
0
votes
1answer
22 views

Merge left outer join column

I have a query that use left outer join. something like that : select issues.id, journal.notes from issues left outer join on (issues.id = journal.issue_id and journal.notes != '') So far it ...
0
votes
1answer
119 views

PostgreSQL user permissions

I have a PostgreSQL 9.3 database with the PostGIS extension backing a web application and GeoServer. I have created three users. A read only user for accessing the data in the reference data schema. ...
1
vote
0answers
498 views

Can't set up witness in Repmgr 2.0

I am trying to setup repmgr using the autofailover quick setup tutorial provided on Github Link But I am kind of stuck on the witness section, when trying to create the witness with repmgr -d repmgr ...
0
votes
0answers
27 views

what values to set for the folowing PostgreSQL Variable [closed]

I need to optimize my DB, in order to fine tune, what values to provide for the following variables, please advise, thanks. PgSQLIdleQuery PgSQLXclLock PgSQLConnections PgSQLMaxTTime PgSQLMaxQTime ...
0
votes
1answer
84 views

Sync offline PostgreSQL server

I am new to PostgreSQL. I am looking for a solution wherein 2 mirror images of a database sit on a local and remote server. All the work is done on the local server and at periodically synced with the ...
2
votes
1answer
63 views

Postgresql not using GIN trigram index when performing non-ASCII LIKE query?

Steps to reproduce Create database CREATE DATABASE citiesdb WITH OWNER = citiesowner ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'C' LC_CTYPE = 'C' ...
0
votes
1answer
83 views

Circular foreign key deferrable cascade behavior

I am trying to determine what happens for a particular circular foreign key that will cascade delete. Please feel free to address any other possibilities that my inexperience has not listed. On my ...
1
vote
1answer
98 views

How do I access a old saved tablespace after reinstalling postgres?

So a lot of things might have gone wrong here. I first installed postgres 9.3 on mac 9.1 via homebrew to manage some data. I am using postgres.app. Turns out my harddrive was too small so I decided to ...
0
votes
1answer
85 views

Taking hot backup of slave node in postgres (master-slave config with repmgr)

I have a postgresql setup with master-slave configuration using repmgr. I'm struggling with taking a consistent snapshot backup (pg_start_backup) of the slave node, this is due the fact that the slave ...
2
votes
2answers
51 views

Get count of processed queries

I have been searching a while to find a way to retrieve the amount of queries my postgres database is processing and responding to. I found various statistics about disk I/O, insert/update statistics ...
0
votes
0answers
39 views

PostgreSQL DB size increasing after restoring the same database backup [closed]

I have already asked this in stackoverflow. This is my batch script to take backup: @ECHO OFF d: cd Apps\RemedyStar 9.0 KREMCOS\bin\Debug\PG pg_dump.exe -i -h localhost -p 5432 -U postgres -F c -b ...
0
votes
1answer
31 views

Postgresql condition on subquery results

This is a new question based on the solution to my previous question I have the following tables: users int (pk) user_id date last_visit int (fk) local_site sites int (pk) site_id site_stats ...
0
votes
1answer
37 views

Unable to Start PostgreSQL. kernel's SHMMAX parameter exceeded you limit

When I am trying to start my PostgreSQL I get the following error in the Postgresql.log file: FATAL: could not create shared memory segment: Invalid argument DETAIL: Failed system call was ...
0
votes
1answer
21 views

Insert a file into PostgreSQL BYTEA field using PHP

The previous answers have been horribly complex for the scope of this project. I want to take the $_POST result as a variable and insert it into a BYTEA field of a table. $_SESSION['username'] = ...
0
votes
0answers
31 views

Update query taking 8x times in hot standby environment of Postgresql

I configured streaming replication (hot standby) and tested the update query on it. The update query is taking 8 times more when compared with stand-alone PostgreSQL (9.2 version) system. Some ...
2
votes
1answer
39 views

Recovering a partial PostgreSQL archive

I have $PGDATA/base but nothing else. It was taken from an installation after the postgreSQL service was shutdown, so is clean. Is there any way to recreate the other elements in $PGDATA that allow ...
0
votes
1answer
110 views

Best Approach to storing chat history?

I'm building a chat application (Yes, another one :P) and am really curious about the best way to store a chat's history(String username, String Message, Time, and possibly string channel depending on ...
2
votes
2answers
97 views

How slow is slow in postgres?

I'm working with postgres for the first time. I have a lot of experience with small / medium size data analysis (i.e. things that fit in ram and can be analyzed in R, Stata, Matlab, etc.), but am now ...
2
votes
1answer
37 views

Tuning Postgres for Single connection use? Or is postgres wrong tool?

Any rules of thumb for work_mem, maintenance_work_mem, shared_buffer, etc. for a database that DOESN'T anticipate concurrent connections and that is doing lots of aggregate functions? I'm a social ...
0
votes
1answer
17 views

PgPool fails to auth in master_slave mode

We have two PostgreSQL servers running in master-slave streaming replication mode, behind pgpool. When we activate master_slave mode in pgpool.conf, we get following error: do_md5 failed in slot 1 ...
2
votes
1answer
33 views

How do I sort the results of a recursive query in an expanded tree-like fashion?

Let's assume you have a nodes tables like this: CREATE TABLE nodes ( node serial PRIMARY KEY, parent integer NULL REFERENCES nodes(node), ts timestamp NOT NULL DEFAULT now() ); It ...
1
vote
1answer
43 views

Select query for returning different data based on creation time

I have a view, which will Select data from table reports the select will filter the data based on multiple dates. reports table: id, key_id, position, created_at My select: pr.key_id, ...
8
votes
1answer
4k views

PostgreSQL Database Data File Integrity Check

When running a PostgreSQL database system how do I know my database as a whole has 100% integrity? Basically how do I know if my data files and pages are all 100% good with no corruption? In the ...
1
vote
1answer
134 views

Postgres ODBC driver versions

On the Postgres ODBC driver page the name for each file is of the form: psqlodbc_09_01_0100-x64.zip psqlodbc_09_01_0100.zip psqlodbc_09_01_0100-1.zip psqlodbc_09_01_0200-x64.zip ...