Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Benjamin Smith
On Wednesday, November 02, 2011 01:01:47 PM Yeb Havinga wrote: > Could you tell a bit more about the sudden death? Does the drive still > respond to queries for smart attributes? Just that. It's almost like somebody physically yanked them out of the machine, after months of 24x7 perfect performa

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Benjamin Smith
On Wednesday, November 02, 2011 11:39:25 AM Thomas Strunz wrote: > I have no idea what you do but just the fact that you bought ssds to > improve performance means it's rather high load and hence important. Important enough that we back everything up hourly. Because of this, we decided to give

[GENERAL] UTF-8 for bytea

2011-11-02 Thread Robert James
When trying to INSERT on Postgres (9.1) to a bytea column, via E'' escaped strings, I get the strings rejected because they're not UTF8. I'm confused, since bytea isn't for strings but for binary. What causes this? How do I fix this? (I know that escaped strings is not the best way for binary data

Re: [GENERAL] variable not found in subplan target list

2011-11-02 Thread Tom Lane
Roger Niederland writes: > I stripped enough out of the database that it is only good for a test > case. Here is a public url for getting at the database backup: I've committed a fix for this: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=e4e60e7b6125e77f679861ebf43cc6b9f9db

Re: [GENERAL] 9.1 replication on different arch

2011-11-02 Thread Martín Marqués
2011/11/2 John R Pierce : > On 11/02/11 11:21 AM, Martín Marqués wrote: >> >> Don't worry, they are both x86 arch, so I'll just install 32bit >> postgresql on the 64 bit server. That should make it work, right? > > yes, that should work fine. Sad thing is that it's not so easy on Debian. With Fedo

Re: [GENERAL] OOM Killer / PG9 / RHEL 6.1

2011-11-02 Thread Scott Marlowe
On Wed, Nov 2, 2011 at 10:42 AM, David Kerr wrote: > Howdy, > > just a quick check, is > vm.overcommit_memory = 2 > vm.swappiness = 0 > > Still the way to go with PG9.0 / RHEL 6.1 (64bit) ? If you've got lots of ram, it's better off to throw a "swapoff -a" at the end of rc.local, as I found that

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Yeb Havinga
On 2011-11-02 18:01, Benjamin Smith wrote: So after months of using this SSD without any issues at all, we tentatively rolled this out to production, and had blissful, sweet beauty until about 2 weeks ago, now we are running into sudden death scenarios. Could you tell a bit more about the sudde

Re: [GENERAL] Error On Slony Replication

2011-11-02 Thread Prashant Bharucha
But Host Address should take automatically, same thing is working good on other machine. --- On Wed, 11/2/11, Raymond O'Donnell wrote: From: Raymond O'Donnell Subject: Re: [GENERAL] Error On Slony Replication To: "Prashant Bharucha" Cc: pgsql-general@postgresql.org Received: Wednesday, Nove

Re: [GENERAL] Server move using rsync

2011-11-02 Thread Venkat Balaji
> > We're not doing this long-term, in order to have a backup server we can > fail-over to, but rather as a one-off low impact move of our database. > Consequently, instead of using pg_start_backup and pg_stop_backup, and > keeping all WAL, we're stopping the database, rsync of everything, and > st

Re: [GENERAL] Error On Slony Replication

2011-11-02 Thread Scott Mead
On Wed, Nov 2, 2011 at 2:55 PM, Raymond O'Donnell wrote: > On 02/11/2011 18:34, Prashant Bharucha wrote: > > Hello All > > > > For replication ,Created cluster and after I run Slon command > > > > getting error on > > > > PQconnectdb("dbname=XYZ host= user=cls password=1) failed - could > >

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread John R Pierce
On 11/02/11 11:39 AM, Thomas Strunz wrote: For database I assume random read and writes are by way the most important thing and any recent ssd is orders of magnitude faster in that are compared to HDD even the "slow" Intel drives. actually, SSD's have issues with committed small block (8K) ran

Re: [GENERAL] Error On Slony Replication

2011-11-02 Thread Raymond O'Donnell
On 02/11/2011 18:34, Prashant Bharucha wrote: > Hello All > > For replication ,Created cluster and after I run Slon command > > getting error on > > PQconnectdb("dbname=XYZ host= user=cls password=1) failed - could > not translate host name The host is missing from the above. Ray. -- R

Re: [GENERAL] Error On Slony Replication

2011-11-02 Thread Brandon Phelps
Why do you have host= without a hostname? Where is your closing "? Brandon Phelps Global Linking Solutions O: (704) 973-6855 C: (704) 222-2103 E: bphe...@gls.com On 11/02/2011 02:34 PM, Prashant Bharucha wrote: Hello All For replication ,Created cluster and after I run Slon command getting e

[GENERAL] Error On Slony Replication

2011-11-02 Thread Prashant Bharucha
Hello All For replication ,Created cluster and after I run Slon command  getting error on PQconnectdb("dbname=XYZ host= user=cls password=1) failed - could not translate host name Could you please help ? Thx Prashant

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Thomas Strunz
Vertex 3 and ocz in general has a very bad reputation in the "enthusiast scene". Sudden issues, hard locks, data loss and so on. Just go and look in the OCZ forums. I would not dare by on Vertex 3 for my desktop...have 2 Intel ones. I have no idea what you do but just the fact that you bough

Re: [GENERAL] 9.1 replication on different arch

2011-11-02 Thread John R Pierce
On 11/02/11 11:21 AM, Martín Marqués wrote: Don't worry, they are both x86 arch, so I'll just install 32bit postgresql on the 64 bit server. That should make it work, right? yes, that should work fine. -- john r pierceN 37, W 122 santa cruz ca

Re: [GENERAL] postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.

2011-11-02 Thread Tom Lane
Graham Murray writes: > Since upgrading test systems to postgresql 9.1, I am seeing some inserts > to bytea fields giving errors such as "ERROR: invalid byte sequence for > encoding "UTF8": 0xf9" Where the insert is from a C program using libpq > and is of the form "insert into xxx values(E'%s')"

Re: [GENERAL] 9.1 replication on different arch

2011-11-02 Thread Martín Marqués
Don't worry, they are both x86 arch, so I'll just install 32bit postgresql on the 64 bit server. That should make it work, right? El día 2 de noviembre de 2011 14:55, Adam Cornett escribió: > > 2011/11/2 Martín Marqués >> >> I have two servers, one a x86 32bit server, and the other one is a x86

Re: [GENERAL] installation problems on OSX Lion

2011-11-02 Thread adamaltman
sean, could you share your solution in a little more detail. im having the exact problem now... -- View this message in context: http://postgresql.1045698.n5.nabble.com/installation-problems-on-OSX-Lion-tp4627419p4957366.html Sent from the PostgreSQL - general mailing list archive at Nabble.co

[GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Chris Dumoulin
We're using postgresql 9.1, and we've got a table that looks like this: testdb=# \d item Table "public.item" Column | Type | Modifiers ---+--+--- sig | bigint | not null type | smallint | data | text | Indexes: "item_pkey" PRIMARY KEY, btree (sig) And

[GENERAL] postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.

2011-11-02 Thread Graham Murray
Since upgrading test systems to postgresql 9.1, I am seeing some inserts to bytea fields giving errors such as "ERROR: invalid byte sequence for encoding "UTF8": 0xf9" Where the insert is from a C program using libpq and is of the form "insert into xxx values(E'%s')" where the value is the return

[GENERAL] variable not found in subplan target list

2011-11-02 Thread Roger Niederland
Hello, I stripped down the original query to what is below. I am not saying that the query below is useful except to show an error I am getting in Postgresql 9.1.1 on both SL6.1 (64 bit) and Windows 2008 server 9.1.1 (32-bit and 64-bit). The error I am getting is: ERROR: variable not found

Re: [GENERAL] OOM Killer / PG9 / RHEL 6.1

2011-11-02 Thread Alex Hunsaker
On Wed, Nov 2, 2011 at 10:42, David Kerr wrote: > Howdy, > > just a quick check, is > vm.overcommit_memory = 2 > vm.swappiness = 0 > > Still the way to go with PG9.0 / RHEL 6.1 (64bit) ? IMHO yes (although I never touch swappiness...) > I know we gained some control over the OOM Killer in newer

Re: [GENERAL] 9.1 replication on different arch

2011-11-02 Thread Adam Cornett
2011/11/2 Martín Marqués > I have two servers, one a x86 32bit server, and the other one is a x86 > 64 bit server. > > We want to use synchronous replication and make the 32 bit be a master > and the 64bit be a read-only stand-by. > > Do I have to install 32bit postgresql on the 64bit server to b

[GENERAL] 9.1 replication on different arch

2011-11-02 Thread Martín Marqués
I have two servers, one a x86 32bit server, and the other one is a x86 64 bit server. We want to use synchronous replication and make the 32 bit be a master and the 64bit be a read-only stand-by. Do I have to install 32bit postgresql on the 64bit server to be able to use wal replication? -- Mar

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread John R Pierce
you really need to watch out for excess write caching on SSDs. only a few are safe against power failures while under heavy database write activity. -- john r pierceN 37, W 122 santa cruz ca mid-left coast -- Sent via pgsql-general maili

Re: [GENERAL] Regarding the shared disk fail over cluster configuration

2011-11-02 Thread Scott Mead
On Wed, Nov 2, 2011 at 11:55 AM, Debasis Mishra wrote: > Thanks a lot Ondrej Ivanic.I have few more doubts. > > 1)While installing the postgress it asks for the data directory,which i > refer to SAN volume(Shared LUN)-(example - /dbdata/pgsqldata). > > After that i am exporting $PGDATA= SAN Volume

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread David Boreham
On 11/2/2011 11:01 AM, Benjamin Smith wrote: 2) Intel X25E - good reputation, significantly slower than the Vertex3. We're buying some to reduce downtime. If you don't mind spending money, look at the new 710 Series from Intel. Not SLC like the X25E, but still specified with a very high write

Re: [GENERAL] Regarding the shared disk fail over cluster configuration

2011-11-02 Thread Alan Hodgson
On November 2, 2011 08:55:39 AM Debasis Mishra wrote: > My doubt is - Whether cluster should start the postgres service in > secondary node during failover or postgress will be running always. My > undersatnding was in both the node postgress will be running and pointing > to shared dbdata. And if

Re: [GENERAL] Why is there no 8.3.16 rpm with _id ?

2011-11-02 Thread Robert Treat
2011/10/30 Devrim GÜNDÜZ : > > [Moving to pgsql-general] > > On Sun, 2011-10-30 at 07:24 +0100, hubert depesz lubaczewski wrote: >> we'd like to upgrade to newest 8.3, and we're on 8.3.11 _id, but it >> looks like 8.3.11 is the newest version of 8.3 built with integer >> datetimes: >> http://yum.po

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Merlin Moncure
On Wed, Nov 2, 2011 at 12:01 PM, Benjamin Smith wrote: > Well, > > After reading several glowing reviews of the new OCZ Vertex3 SSD last spring, > we did some performance testing in dev on RHEL6. (CentOS) > > The results were nothing short of staggering. Complex query results returned > in 1/10th

[GENERAL] Recommendations for SSDs in production?

2011-11-02 Thread Benjamin Smith
Well, After reading several glowing reviews of the new OCZ Vertex3 SSD last spring, we did some performance testing in dev on RHEL6. (CentOS) The results were nothing short of staggering. Complex query results returned in 1/10th the time as a pessimistic measurement. System loads dropped from

[GENERAL] OOM Killer / PG9 / RHEL 6.1

2011-11-02 Thread David Kerr
Howdy, just a quick check, is vm.overcommit_memory = 2 vm.swappiness = 0 Still the way to go with PG9.0 / RHEL 6.1 (64bit) ? I know we gained some control over the OOM Killer in newer kernels and remember reading that maybe postgres could handle it in a different way now. Thanks Dave -- Se

Re: [GENERAL] Server move using rsync

2011-11-02 Thread Robert Treat
On Tue, Nov 1, 2011 at 11:08 AM, Alan Hodgson wrote: > On October 31, 2011 03:01:19 PM Stephen Denne wrote: >> I'm wondering whether it's worth doing anyway, simply to check that it >> doesn't do something completely unexpected, which would presumably alert >> us to something we hadn't considered.

Re: [GENERAL] Regarding the shared disk fail over cluster configuration

2011-11-02 Thread Debasis Mishra
Thanks a lot Ondrej Ivanic.I have few more doubts. 1)While installing the postgress it asks for the data directory,which i refer to SAN volume(Shared LUN)-(example - /dbdata/pgsqldata). After that i am exporting $PGDATA= SAN Volume(example - /dbdata/pgsqldata). Where /dbdata is the shared LUN .

[GENERAL] equivalent to "replication_timeout" on standby server

2011-11-02 Thread Samba
Hi all, The postgres manual explains the "replication_timeout" to be used to "Terminate replication connections that are inactive longer than the specified number of milliseconds. This is useful for the primary server to detect a standby crash or network outage" Is there a similar configuration

Re: [GENERAL] does reindex need exclusive table access?

2011-11-02 Thread Tom Lane
Vincent de Phily writes: > The technique kinda works (with some changes) using unique indexes however. > Is > there a functional difference between a unique index and a primary key index > (knowing that my column is not null) ? Or is it just for documentation and > ORM > purposes ? The only

Re: [GENERAL] does reindex need exclusive table access?

2011-11-02 Thread Vincent de Phily
On Tuesday 01 November 2011 12:00:33 Craig Ringer wrote: > A workaround for reindexing while live is to begin a transaction, create > the new index with a new name, drop the old one, rename the new one to > the old one, and commit. This only requires an exclusive lock for the > period of the drop a

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Merlin Moncure
On Wed, Nov 2, 2011 at 8:20 AM, Chris Dumoulin wrote: > On 11-11-02 09:13 AM, Martijn van Oosterhout wrote: >> >> On Wed, Nov 02, 2011 at 07:22:09AM -0400, Chris Dumoulin wrote: >>> >>> And we're doing an insert like this: >>> INSERT INTO Item (Sig, Type, Data) SELECT $1,$2,$3 WHERE NOT EXISTS >>>

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Chris Dumoulin
On 11-11-02 09:13 AM, Martijn van Oosterhout wrote: On Wed, Nov 02, 2011 at 07:22:09AM -0400, Chris Dumoulin wrote: And we're doing an insert like this: INSERT INTO Item (Sig, Type, Data) SELECT $1,$2,$3 WHERE NOT EXISTS ( SELECT NULL FROM Item WHERE Sig=$4) In this case $1 and $4 should always

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Martijn van Oosterhout
On Wed, Nov 02, 2011 at 07:22:09AM -0400, Chris Dumoulin wrote: > And we're doing an insert like this: > INSERT INTO Item (Sig, Type, Data) SELECT $1,$2,$3 WHERE NOT EXISTS > ( SELECT NULL FROM Item WHERE Sig=$4) > > In this case $1 and $4 should always be the same. FWIW, If they're always going

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Chris Dumoulin
On 11-11-02 08:49 AM, Merlin Moncure wrote: On Wed, Nov 2, 2011 at 6:22 AM, Chris Dumoulin wrote: We're using postgresql 9.1, and we've got a table that looks like this: testdb=# \d item Table "public.item" Column | Type | Modifiers ---+--+--- sig | bigint | n

Re: [GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Merlin Moncure
On Wed, Nov 2, 2011 at 6:22 AM, Chris Dumoulin wrote: > We're using postgresql 9.1, and we've got a table that looks like this: > > testdb=# \d item > Table "public.item" >  Column   |   Type   | Modifiers > ---+--+--- >  sig   | bigint   | not null >  type  | smallint | >  dat

[GENERAL] select where not exists returning multiple rows?

2011-11-02 Thread Chris Dumoulin
We're using postgresql 9.1, and we've got a table that looks like this: testdb=# \d item Table "public.item" Column | Type | Modifiers ---+--+--- sig | bigint | not null type | smallint | data | text | Indexes: "item_pkey" PRIMARY KEY, btree (sig) And