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)

0
votes
0answers
112 views

Performance of large queries on low bandwidth connections

I've been running some measurements on bandwidth needs and the effects of latency on query performance against Postgres 8.3 (waiting for management to approve upgrade) on Windows. SELECTs of various ...
0
votes
0answers
105 views

Identical Postgres index scan taking 5x longer on server

I have an intermediate table for managing a many-to-many relation between tables called Expert and Subject: Column | Type | Modifiers ...
0
votes
0answers
1k views

createdb: could not connect to database postgres: FATAL: could not write init file [closed]

RedHat Enterprise Server 3.0 32 Bits psql (PostgreSQL) 8.2.3 user: postgres server is running: /soft/postgres/8.2.3/bin/pg_ctl start pg_ctl: another server may be running; trying to start server ...
0
votes
1answer
848 views

pg_dump from 9.2 to 8.4 [closed]

I'm trying to restore a db dump from PostgreSQL 9.2 to PostgrSQL 8.4 (from separate machines, both are running Windows 7). I followed the instructions in this answer: Use pg_restore to restore from ...
0
votes
0answers
414 views

Postgresql Retrieve / Find Primary Key Serial Autonumber field for Audit logs

I need to find the Primary Key field name in each of a number (approx 70) of tables to create audit logs. All the primary keys are type serial (auto incrementing integer) and all have the name in the ...
0
votes
1answer
474 views

Configuring Postgres 9.2 streaming replication with Redhat Clustering Suite for High Availability

I'm in the process of configuring postgresql 9.2 streaming replication with Redhat Clustering Suite for high availability. I have 1 master and 1 hot standby configured to replicate the data from ...
0
votes
0answers
299 views

PostgreSQL: Slave doesn't replicate the Master's data

I'm using PostgreSQL 9.2.3 on both computers, both of which run Win2008R2. I've setup streaming replication by following this guide: ...
0
votes
1answer
841 views

How to insert binary data into a PostgreSQL BYTEA column using libpqxx?

I'm a newbie at SQL, and even greener when it comes to using the PostgreSQL C++ API libpqxx. What I'd like to do is insert some binary data into a BYTEA column, but I find the Doxygen output is ...
0
votes
1answer
549 views

Set field values to newly imported rows in PostgreSQL table with existing data

I have a PostgreSQL table with existing data, and needs to import all the rows in a CSV file into that table. I am using pgadmin3's Import tool to do the import. Question: For the newly imported ...
0
votes
0answers
94 views

PostgreSQL : Londiste issue

I am new to Londiste, And I want to install Londiste, accroding the Londiste Tutorial after I intall skytool (http://pgfoundry.org/frs/?group_id=1000206) , I can not find the pgqadm.py script , ...
0
votes
1answer
887 views

How to turn the foreign key constraints on and off while db restore in postgres? [closed]

After using below the backup cmd in a db with 250+ tables: pg_dump -h localhost -p portNum -U userName -f fileName -o dbName I tried restoring it with the following command: psql -h localhost -p ...
0
votes
1answer
312 views

A stored procedure to bulk load in Postgres or Oracle given a URL [closed]

Is there a stored procedure available in Postgres or Oracle that does a bulk load given a URL, as in: url_bulkload csvFile.ctl Where csvFile.ctl is # # csvFile.ctl -- Control file to load CSV ...
0
votes
0answers
371 views

Create Log file for insert,update and delete records and retrive the log details

How to create/update log file for each modifications(insert,update,delete) in my database. i cant find any feasible methods to achieve so. can anybody know how to implement this.? if so then please ...
0
votes
0answers
674 views

Install PostgreSQL 9.2 on Windows using WIN1252 encoding.

I had installed PostgreSQL 9.2 earlier and it always installed with the encoding being WIN1252 (the default database was WIN1252). I then some time ago reinstalled it with the encoding being UTF8 (I ...
0
votes
1answer
325 views

UPPER Case issue postgreSQL when importing from text file

I have ruby and rails app, and I have cron task to download text file and import it to the database using \copy hotels FROM 'db/ActivePropertyList.txt' DELIMITER '|' There is a header field which ...
0
votes
0answers
808 views

Postgres error ( XX000: invalid memory alloc request size 4294967290 )

I'm getting the following error in my postgres 8.4 database: XX000: invalid memory alloc request size 4294967290 Operating System : Windows 7 64 bit Memory : 8GB Database Version: Postgres 8.4 ...
0
votes
1answer
477 views

multi-master to single-slave replication at table level with PostgreSQL or MySQL

Here is my scenario Master1 hosting DB1 Master2 hosting DB2 ... MasterN hosting DBN replicate to: Slave1 hosting DB1,DB2... DBN I've read similar questions and they recommend to start different ...
0
votes
0answers
175 views

PostgreSQL can't start after tuning some options

I'm having some issues with "too many clients" and I tried to change the max_connections param (currently 100). I tried to set some value like 300, but when I restart the service, I got this ...
0
votes
1answer
163 views

Postgres DB - Commit xlog files after server crash

After a server crash, it would seem that all transactions going back a number of months are not showing up in the live Postgres DB. Investigation has found all xlog files that does contain the data ...
0
votes
2answers
370 views

Merging multiple databases as separate schemas in PostgreSQL

I have to combine data from 4 different databases. Each having its own design. What i want to do is to Create a new database with my desired schema. and one schema per (to be merged) database Then ...
0
votes
0answers
77 views

Long disk queue when no traffic

I got dedicated disk (RAID 10 - 4 SAS disks) for Postgres. I am bit worried as recently, I see under Windows Resource Manager disk queues like 3+ in the mornings (low traffic hours), like every 30-60 ...
0
votes
0answers
357 views

multiple postgreSQL running as primary server on pgpool

I'm facing problem with my pgpool setup. Currently, this is my requirement based on the pgpool documentation here : Server A : Install with PostgreSQL database. Run as primary server Server B : ...
0
votes
0answers
403 views

PostgreSQL pg_bulkload query eats all free disk space

I have a simple task: bulk insert csv file to the table. The .ctl file is TYPE = CSV # Input file type ESCAPE = \ # Escape character for Quoting ...
0
votes
0answers
30 views

Running a CTE query in a loop using PL/PGSQL [duplicate]

Possible Duplicate: Running a CTE query in a loop using PL/pgSQL (Cross-post from http://stackoverflow.com/q/12625914/1555778) I'm trying to execute query that is repeatedly called in a ...
0
votes
1answer
349 views

PostgreSQL: Trouble accessing another server's Data via NFS

Background: I'm working on a 2-node High Availability PostgreSQL database cluster for my company. The system has a master/standby setup where the standby takes over the duties of the master when the ...
0
votes
1answer
308 views

Update Postgres on server that already has version included with system

Mac OS X (Lion) Server includes Postgres (9.0.5) that it uses for some system utilities (Wiki server, caldav, etc.). I'm about to start using this server for some Rails applications and am wondering ...
0
votes
0answers
46 views

postgresql view [duplicate]

Possible Duplicate: postgresql view with max min with id I have the following table: CREATE TABLE trans ( id SERIAL PRIMARY KEY, trans_date date, trans_time time ); I ...
0
votes
0answers
132 views

Hello, I want to build up Postgresql 9.0 replication on Ubuntu 11.04 [closed]

I want to build up replication on postgresql 9.0 that too on Ubuntu 11.04. Please let me know through which method it is possible? I have tried many options including slony, streaming replication ...
-1
votes
2answers
349 views

PostgreSQL kill - Sighup pid [closed]

To reload the configuration files, we send the SIGHUP signal to the postmaster, which then passes that on to all connected backends. That's why some people call reloading the server ...
-1
votes
1answer
125 views

PostgreSQL indeterminate ordering of results [closed]

When I have this query: SELECT DISTINCT "spree_products".id FROM "spree_products" INNER JOIN "spree_variants" ON "spree_variants"."product_id" = "spree_products"."id" AND ...
-1
votes
1answer
92 views

PostgreSQL select optimization

Can you please explain, how I can optimize select like this: SELECT * FROM calls WHERE id_temp % 5 = 0 LIMIT 300000 This select is working on table with 50 millions of records. Thanks a lot and ...
-1
votes
2answers
176 views

Find records in same table with different company id but some other same values [closed]

I have subscriptions table that looks roughly: table subscriptions id (auto generated id) company_id city state subscription_date I would like to find records that: A) are of different company ...
-1
votes
2answers
31 views

Indexing into two “buckets”

I'm creating a database with PostgreSQL that has an integer field called "delay". All of my queries on this column will be checking if the value of this column is less than or equal to 0, or greater ...
-1
votes
3answers
1k views

How do I install postgresql in Ubuntu?

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 ...
-1
votes
2answers
727 views

pg_dump format => custom vs sql

There are 2 main formats for pg_dump: custom vs sql. For custom, it's compressed by default, and not readable if you try to open it. But is it faster to dump into this format as opposed to SQL format. ...
-1
votes
1answer
316 views

Important distinctions between DBMSs [closed]

DBA is a career I'm strongly considering after school, but my limited experience mostly involves some PL/SQL Oracle web programming, some basic PHP/MySQL web pages, and some queries in SQL Server. ...
-1
votes
1answer
43 views

Inserting null value without quotes postgresql

I'm creating a php application which relies on postgresql. Now i have this query: $query= 'INSERT INTO "users" ("name", "username", "email", "phone") VALUES (\''. $name .'\', \''. $username .'\', ...
-1
votes
1answer
26 views

how to stop the execution after n-th continues query execution

Is there any way to limit the continues query execution in postgres? I have a program to run the queries (10000+). But I need know is there any way to stop (break) the execution after exactly 10000 ...
-1
votes
2answers
135 views

Select records for a day and a day - 1 day

From one table, I want to get the records from one column position when the created_at = Today and when the created_at = created_at - 1.day COALESCE(array_agg(DISTINCT pr.position)) AS position, ...
-1
votes
1answer
66 views

Renaming a column in a PostgreSQL database table

This is essentially the same question as How do I rename a column in a database table using SQL?. So, I want to rename a column in a table. This column is part of a set of tables that lives inside a ...
-1
votes
1answer
100 views

How to put one table on one disk and anther table on another (a ramdisk)?

I need to build a database with one table stored on one disk and anther table stored on a different disk (a ramdisk). Is it possible to do it? As far as I know, using two separate databases, one ...
-1
votes
1answer
479 views

Insert a 'null' string in a table in postgresql [closed]

I would like to know if it is possible to insert a 'null' string in a column which has NOT NULL constraint. I'm using postgresql. The query would look like the below INSERT INTO ...
-1
votes
1answer
286 views

Database for an application similar to Chatroulette

I am making an app that is similar to Chatroulette. When a user starts the app it finds someone that is not currently talking to anyone and have them talk to each other. At any point a user could ...
-1
votes
1answer
48 views

Database Design for classifieds site [closed]

I'm creating a classifieds site where there are many categories and subcategories. 1) Each category has different fields. 2) Each listing has one or more images I need help with the database design. ...
-1
votes
1answer
105 views

Access table field on creating a trigger postgresql

How can I access table field on creating a trigger? CREATE TRIGGER foo_trigger AFTER INSERT OR UPDATE OR DELETE ON foo FOR EACH ROW EXECUTE PROCEDURE proc(foo.field);//here goes the parameter
-1
votes
1answer
120 views

Group by for UNION not working Postgresql

I can't find a way to make Group by works in Postgresql, How can i make group by works so each name will be only one , not repeated many times like what i got in this picture? Here is a code for what ...
-1
votes
2answers
147 views

What database should I use to create a webmail service like gmail? [closed]

I planned to use python for my frontend with django framework. But for backend, I have no idea which database I should use. Since it involves plenty of reads and writes can someone point me in the ...
-1
votes
1answer
186 views

Recovering a dropped column?

I have a PostgreSQL table: CREATE TABLE essays ( id serial primary key, content text ); I inserted a few rows, then ran: ALTER TABLE essays DROP COLUMN content; How can I recover the ...
-1
votes
1answer
452 views

how to export postgresql database table into mysql

I am trying to get data from a Postgres database, but I am totally new to using Postgres. I am here to ask my question to get some ideas from the best answer on how can I can do this. If possible, I'd ...
-1
votes
1answer
181 views

Should I keep pg_xlog on the same disk as data if using disk snapshotting?

We're running on EBS volumes on EC2. We're interested in leveraging EBS snapshotting for backups. However, does this mean we'd need to ensure our pg_xlog is on the same EBS volume as our data? (I ...