Re: Fwd: Re: [GENERAL] SSDD reliability

2011-05-05 Thread Florian Weimer
* Greg Smith: Intel claims their Annual Failure Rate (AFR) on their SSDs in IT deployments (not OEM ones) is 0.6%. Typical measured AFR rates for mechanical drives is around 2% during their first year, spiking to 5% afterwards. I suspect that Intel's numbers are actually much better than

[GENERAL] 64-bit PostgreSQL AMI for CentOS 5.5?

2011-05-05 Thread Kunal Ashar
I'm attempting to get PostgreSQL-PostGIS in the Amazon EC2 cloud. Does anyone have any information on where I can find a 64-bit AMI for Linux CentOS 5.5 + PostgreSQL 9.0.4 + PostGIS 1.5.2? Thanks in advance, Kunal -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread tushar nehete
Hi, I gone through the steps from bucardo sites as, [root@billingtest1 Bucardo-4.4.3]# perl Makefile.PL WARNING: LICENSE is not a known parameter. Warning: prerequisite DBD:g 2.0 not found. We have 1.49. Warning: prerequisite ExtUtils::MakeMaker 6.32 not found. We have 6.30. 'LICENSE' is not a

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread Andrew Sullivan
On Thu, May 05, 2011 at 03:07:20PM +0530, tushar nehete wrote: Hi, I gone through the steps from bucardo sites as, [root@billingtest1 Bucardo-4.4.3]# perl Makefile.PL WARNING: LICENSE is not a known parameter. Warning: prerequisite DBD:g 2.0 not found. We have 1.49. Warning: prerequisite

[GENERAL] Queries Regarding Postgresql Replication

2011-05-05 Thread Nithya Rajendran
Hi , I have some couple of queries while doing postgres replication, === How to find whether current postgres is running as master or slave? What is the procedure to make the failed master as working slave? Could you please clarify above queries. Thanks and Regards Nithya R Lead Engineer|

Re: [GENERAL] permission denied for schema even as superuser.

2011-05-05 Thread Chris Young
Apologies, I have already solved this. I forgot to grant usage on schema nms to foo; where foo is the owner of mainview_teststatusevent. Cheers, Chris On Thu, May 5, 2011 at 7:03 PM, Chris Young ch...@chris.net.au wrote: Greetings, I'm trying to perform the following query, but receive a

Re: Fwd: Re: [GENERAL] SSDD reliability

2011-05-05 Thread David Boreham
On 5/5/2011 2:36 AM, Florian Weimer wrote: I'm a bit concerned with usage-dependent failures. Presumably, two SDDs in a RAID-1 configuration are weared down in the same way, and it would be rather inconvenient if they failed at the same point. With hard disks, this doesn't seem to happen;

Re: [GENERAL] SSDD reliability

2011-05-05 Thread David Boreham
On 5/4/2011 11:50 PM, Toby Corkindale wrote: In what way has the SMART read failed? (I get the relevant values out successfully myself, and have Munin graph them.) Mis-parse :) It was my _attempts_ to read SMART that failed. Specifically, I was able to read a table of numbers from the drive,

Re: [GENERAL] postgres segfaulting on pg_restore

2011-05-05 Thread Chris Curvey
Hmm, that's pretty interesting. Possibly it's just another manifestation of something scribbling past the end of its allocated chunk, but my credence for that theory is way down if there's no add-on code involved. Does the postmaster log show any messages like WARNING: detected

Re: [GENERAL] Rearranging simple where clauses

2011-05-05 Thread Igor Neyman
-Original Message- From: Michael Graham [mailto:mgra...@bloxx.com] Sent: Wednesday, May 04, 2011 11:59 AM To: pgsql-general@postgresql.org Subject: Re: Rearranging simple where clauses On Wed, 2011-05-04 at 11:49 -0400, Tom Lane wrote: Well, you failed to show us any concrete examples

Re: [GENERAL] SSDD reliability

2011-05-05 Thread Scott Ribe
On May 4, 2011, at 9:34 PM, David Boreham wrote: So ok, yeah...I said that chips don't just keel over and die mid-life and you came up with the one counterexample in the history of the industry Actually, any of us who really tried could probably come up with a dozen examples--more if we've

[GENERAL] Generating fields in views with search/replace?

2011-05-05 Thread Asfand Qazi (Sanger Institute)
Hi, Say I have a table with fields 'template' and 'original_letter', and 'new_selected_letter'. 'template' could be 'abcdefg0abcdefg', original_letter could be 'A' and new_selected_letter could be 'B'. I want a view where I see 2 fields: 'original' as 'abcdefgAabcdefg' and 'new_selected' as

Re: [GENERAL] Generating fields in views with search/replace?

2011-05-05 Thread Merlin Moncure
On Thu, May 5, 2011 at 9:09 AM, Asfand Qazi (Sanger Institute) aq2.san...@gmail.com wrote: Hi, Say I have a table with fields 'template' and 'original_letter', and 'new_selected_letter'.  'template' could be 'abcdefg0abcdefg', original_letter could be 'A' and new_selected_letter could be 'B'.

Re: [GENERAL] SSDD reliability

2011-05-05 Thread David Boreham
On 5/5/2011 8:04 AM, Scott Ribe wrote: Actually, any of us who really tried could probably come up with a dozen examples--more if we've been around for a while. Original design cutting corners on power regulation; final manufacturers cutting corners on specs; component manufacturers cutting

Re: [GENERAL] undead index

2011-05-05 Thread Cédric Villemain
2011/5/4 Jens Wilke jens.wi...@affinitas.de: This index was deleted several weeks ago. [...] after pg_dumpall|psql from 8.4 to 9.0 the undead index revived on the target DB: I understood that you droped an index and when you dump/restore you get your index again. Did I miss something ? --

[GENERAL] Cannot reproduce why a query is slow

2011-05-05 Thread John Cheng
Hi, We have certain types of query that seems to take about 900ms to run according to postgres logs. When I try to run the same query via command line with EXPLAIN ANALYZE, the query finishes very quickly. What should I do to try to learn more about why it is running slowly? The query is a bit

[GENERAL] permission denied for schema even as superuser.

2011-05-05 Thread Chris Young
Greetings, I'm trying to perform the following query, but receive a perplexing error, even as superuser (postgres): umdb_db=# insert into mainview_teststatusevent (timestamp,host_id,test_id,old_status_id,new_status_id) values(now(), 726,4,6,1); ERROR: permission denied for schema nms LINE 1:

[GENERAL] 64-bit PostgreSQL AMI for CentOS 5.5?

2011-05-05 Thread Kunal Ashar
I'm attempting to get PostgreSQL-PostGIS in the Amazon EC2 cloud. Does anyone have any information on where I can find a 64-bit AMI for Linux CentOS 5.5 + PostgreSQL 9.0.4 + PostGIS 1.5.2? Thanks in advance, Kunal -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

[GENERAL] 64-bit PostgreSQL AMI for CentOS 5.5?

2011-05-05 Thread Kunal Ashar
I'm attempting to get PostgreSQL-PostGIS in the Amazon EC2 cloud. Does anyone have any information on where I can find a 64-bit AMI for Linux CentOS 5.5 + PostgreSQL 9.0.4 + PostGIS 1.5.2? Thanks in advance, Kunal -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] permission denied for schema even as superuser.

2011-05-05 Thread John Cheng
Could it be triggering a function that is defined with SECURITY DEFINER and the definer of the function does not have the right permissions? On Thu, May 5, 2011 at 4:03 AM, Chris Young ch...@chris.net.au wrote: Greetings, I'm trying to perform the following query, but receive a perplexing

Re: [GENERAL] postgres segfaulting on pg_restore

2011-05-05 Thread Tom Lane
Chris Curvey ch...@chriscurvey.com writes: Hmm, that's pretty interesting. Possibly it's just another manifestation of something scribbling past the end of its allocated chunk, but my credence for that theory is way down if there's no add-on code involved. Does the postmaster log show any

Re: [GENERAL] permission denied for schema even as superuser.

2011-05-05 Thread Tom Lane
Chris Young ch...@chris.net.au writes: Greetings, I'm trying to perform the following query, but receive a perplexing error, even as superuser (postgres): umdb_db=# insert into mainview_teststatusevent (timestamp,host_id,test_id,old_status_id,new_status_id) values(now(), 726,4,6,1); ERROR:

Re: [GENERAL] Cannot reproduce why a query is slow

2011-05-05 Thread John Cheng
On Thu, May 5, 2011 at 8:54 AM, Andrew Sullivan a...@crankycanuck.ca wrote: On Thu, May 05, 2011 at 08:02:46AM -0700, John Cheng wrote: We have certain types of query that seems to take about 900ms to run according to postgres logs. When I try to run the same query via command line with

Re: [GENERAL] Cannot reproduce why a query is slow

2011-05-05 Thread Andrew Sullivan
On Thu, May 05, 2011 at 09:27:47AM -0700, John Cheng wrote: I have a couple of queries that allow me to see the active locks in the database. It might help me see if these queries are blocked by other locking queries. Yes. The pg_locks view is your friend here. In terms of IO limits,

[GENERAL] dblink() from GridSQL

2011-05-05 Thread Sam Nelson
Hi List, We have a customer who is trying to migrate a few PostgresPlus instances to GridSQL clusters. They have a process that pulls data from another server using dblink every night, and we're trying to replicate that on the GridSQL instance, but grid is being a bit of a pain. Grid doesn't

Re: [GENERAL] dblink() from GridSQL

2011-05-05 Thread Merlin Moncure
On Thu, May 5, 2011 at 12:13 PM, Sam Nelson s...@consistentstate.com wrote: Hi List, We have a customer who is trying to migrate a few PostgresPlus instances to GridSQL clusters.  They have a process that pulls data from another server using dblink every night, and we're trying to replicate

Re: [GENERAL] dblink() from GridSQL

2011-05-05 Thread Scott Mead
On Thu, May 5, 2011 at 1:40 PM, Merlin Moncure mmonc...@gmail.com wrote: On Thu, May 5, 2011 at 12:13 PM, Sam Nelson s...@consistentstate.com wrote: Hi List, We have a customer who is trying to migrate a few PostgresPlus instances to GridSQL clusters. They have a process that pulls data

[GENERAL] psql tunneling thru a middle server

2011-05-05 Thread jtkells
Im trying to connect my WS to a postgresql database (destination) via a middle server I.e. WS Middle Database server server 172.x.2.4 172.x.4.12 I can create a SSH tunnel from my WS to the middle server but not sure how or if I can make

[GENERAL] Multiple table relationship constraints

2011-05-05 Thread Jack Christensen
What is the best way to handle multiple table relationships where attributes of the tables at the ends of the chain must match? Example: CREATE TABLE achievements( achievement_id serial PRIMARY KEY, ... ); CREATE TABLE achievement_versions( achievement_version_id serial PRIMARY KEY,

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread Rick Genter
On Thu, May 5, 2011 at 3:20 PM, Jack Christensen ja...@hylesanderson.eduwrote: What is the best way to handle multiple table relationships where attributes of the tables at the ends of the chain must match? Example: CREATE TABLE achievements( achievement_id serial PRIMARY KEY, ... );

Re: [GENERAL] psql tunneling thru a middle server

2011-05-05 Thread Rick Chu
On Thu, 2011-05-05 at 15:05 -0400, jtke...@verizon.net wrote: Im trying to connect my WS to a postgresql database (destination) via a middle server I.e. WS Middle Database server server 172.x.2.4 172.x.4.12 I can create a SSH

Re: [GENERAL] Generating fields in views with search/replace?

2011-05-05 Thread Bosco Rama
Asfand Qazi (Sanger Institute) wrote: Say I have a table with fields 'template' and 'original_letter', and 'new_selected_letter'. 'template' could be 'abcdefg0abcdefg', original_letter could be 'A' and new_selected_letter could be 'B'. I want a view where I see 2 fields: 'original' as

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Jack Christensen Sent: Thursday, May 05, 2011 3:20 PM To: pgsql Subject: [GENERAL] Multiple table relationship constraints 4. Validate application side -- this can

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread Jack Christensen
On 5/5/2011 2:28 PM, Rick Genter wrote: On Thu, May 5, 2011 at 3:20 PM, Jack Christensen ja...@hylesanderson.edu mailto:ja...@hylesanderson.edu wrote: What is the best way to handle multiple table relationships where attributes of the tables at the ends of the chain must match?

Re: [GENERAL] SSDD reliability

2011-05-05 Thread Greg Smith
On 05/05/2011 10:35 AM, David Boreham wrote: On 5/5/2011 8:04 AM, Scott Ribe wrote: Actually, any of us who really tried could probably come up with a dozen examples--more if we've been around for a while. Original design cutting corners on power regulation; final manufacturers cutting

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread Rick Genter
On Thu, May 5, 2011 at 3:50 PM, Jack Christensen ja...@hylesanderson.eduwrote: The trick is there are additional attributes of actions and achievements such as a category that must match for the link to be valid. These attributes are not part of the primary key of either record and can and do

Re: [GENERAL] dblink() from GridSQL

2011-05-05 Thread Sam Nelson
Grid passes functions off to underlying databases. Unfortunately, it doesn't do so when the functions are in the from clause. If it did, that would work. But I digress. We're attempting to try either the csv import (which would require a new script, but no biggie) or a data pull on the

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread Jack Christensen
On 5/5/2011 2:53 PM, Rick Genter wrote: On Thu, May 5, 2011 at 3:50 PM, Jack Christensen ja...@hylesanderson.edu mailto:ja...@hylesanderson.edu wrote: The trick is there are additional attributes of actions and achievements such as a category that must match for the link to be

Re: [GENERAL] Multiple table relationship constraints

2011-05-05 Thread Rick Genter
On Thu, May 5, 2011 at 4:14 PM, Jack Christensen ja...@hylesanderson.eduwrote: It's not denormalized. It is an attribute that both tables have that have to match for it to be a valid link. Here's a contrived example: CREATE TABLE dorms( dorm_id serial PRIMARY KEY, gender varchar NOT

Re: [GENERAL] SSDD reliability

2011-05-05 Thread Scott Marlowe
On Thu, May 5, 2011 at 1:54 PM, Greg Smith g...@2ndquadrant.com wrote: I think your faith in PC component manufacturing is out of touch with the actual field failure rates for this stuff, which is produced with enormous cost cutting pressure driving tolerances to the bleeding edge in many

[GENERAL]

2011-05-05 Thread Ovidiu Farauanu
unsubscribe

[GENERAL] multiple sequence number for one column

2011-05-05 Thread mirthcyy
hi group, we need help on one postgresql locking issue: Originally we have a table like below; id bigint not null nextval('xxx)', customer_id int not null, insert_record_date timestamp not null ... so this id column is using a sequence number that applies to all customers. And it's the primary

Re: [GENERAL] multiple sequence number for one column

2011-05-05 Thread Merlin Moncure
On Thu, May 5, 2011 at 1:54 PM, mirthcyy mirth...@gmail.com wrote: hi group, we need help on one postgresql locking issue: Originally we have a table like below; id bigint not null nextval('xxx)', customer_id int not null, insert_record_date timestamp not null ... so this id column is

Re: Fwd: Re: [GENERAL] SSDD reliability

2011-05-05 Thread Greg Smith
On 05/04/2011 08:31 PM, David Boreham wrote: Here's my best theory at present : the failures ARE caused by cell wear-out, but the SSD firmware is buggy in so far as it fails to boot up and respond to host commands due to the wear-out state. So rather than the expected outcome (SSD responds but

Re: [GENERAL] multiple sequence number for one column

2011-05-05 Thread David Johnston
Is there a good way to solve this issue? Thanks a lot Yes, multiple actually. ... one db centric solution is to create a sequence for each customer id and then nextval that specific sequence when you need a new id. Would need to know more about the number of customers and how

[GENERAL] SMART attributes for SSD (was: SSDD reliability)

2011-05-05 Thread Toby Corkindale
On 05/05/11 22:50, David Boreham wrote: On 5/4/2011 11:50 PM, Toby Corkindale wrote: In what way has the SMART read failed? (I get the relevant values out successfully myself, and have Munin graph them.) Mis-parse :) It was my _attempts_ to read SMART that failed. Specifically, I was able

Re: Fwd: Re: [GENERAL] SSDD reliability

2011-05-05 Thread Toby Corkindale
On 05/05/11 18:36, Florian Weimer wrote: * Greg Smith: Intel claims their Annual Failure Rate (AFR) on their SSDs in IT deployments (not OEM ones) is 0.6%. Typical measured AFR rates for mechanical drives is around 2% during their first year, spiking to 5% afterwards. I suspect that Intel's

Re: [GENERAL] Queries Regarding Postgresql Replication

2011-05-05 Thread Josh Kupershmidt
On Thu, May 5, 2011 at 7:33 AM, Nithya Rajendran r-nit...@hcl.com wrote: [Disclaimer: I have minimal experience with hot standby, the below is just from reading the docs] === How to find whether current postgres is running as master or slave? SELECT pg_is_in_recovery(); will tell you (should

Re: [GENERAL] Cannot reproduce why a query is slow

2011-05-05 Thread John Cheng
On Thu, May 5, 2011 at 10:01 AM, Andrew Sullivan a...@crankycanuck.ca wrote: On Thu, May 05, 2011 at 09:27:47AM -0700, John Cheng wrote: I have a couple of queries that allow me to see the active locks in the database. It might help me see if these queries are blocked by other locking

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread Joshua Tolley
On Mon, May 02, 2011 at 11:31:28PM -0700, John R Pierce wrote: AFAIK, the only postgres replication systems that even pretend to support master-master are things like Bucardo that do the replication at the SQL layer, by sending all update/insert/delete commands to both servers, and under

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread John R Pierce
On 05/05/11 8:05 PM, Joshua Tolley wrote: Actually, Bucardo doesn't do statement replication. It, like Slony for instance, replicates data, not SQL statements. And as you pointed out, it does do bidirectional replication in a way that's sufficient for some use cases. does it use triggers for

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread Joshua Tolley
On Thu, May 05, 2011 at 03:07:20PM +0530, tushar nehete wrote: Warning: prerequisite DBD:Pg 2.0 not found. We have 1.49. Warning: prerequisite ExtUtils::MakeMaker 6.32 not found. We have 6.30. You need to install DBD::Pg, version 2.0 or greater. You also need to install ExtUtils::MakeMaker

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread Joshua Tolley
On Thu, May 05, 2011 at 08:13:55PM -0700, John R Pierce wrote: On 05/05/11 8:05 PM, Joshua Tolley wrote: Actually, Bucardo doesn't do statement replication. It, like Slony for instance, replicates data, not SQL statements. And as you pointed out, it does do bidirectional replication in a way

Re: [GENERAL] Bidirectional replication

2011-05-05 Thread John R Pierce
On 05/05/11 8:14 PM, Joshua Tolley wrote: On Thu, May 05, 2011 at 03:07:20PM +0530, tushar nehete wrote: Warning: prerequisite DBD:Pg 2.0 not found. We have 1.49. Warning: prerequisite ExtUtils::MakeMaker 6.32 not found. We have 6.30. You need to install DBD::Pg, version 2.0 or greater. You

[GENERAL] Debug Contrib/cube code

2011-05-05 Thread Nick Raj
Hi, I am using postgresql-8.4.6. I want to debug the contrib/cube code. Can we able to debug that cube code? Because there is no .configure file to enable debug. Is there is any way to change make file to enable debug? Thanks Nick