Re: [GENERAL] Strange problem with create table as select * from table;

2011-11-12 Thread hubert depesz lubaczewski
On Sun, Nov 06, 2011 at 09:34:24AM -0500, Tom Lane wrote: > hubert depesz lubaczewski writes: > > Any chance of getting the fix in patch format so we could test it on > > this system? > > http://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=23998fe99c1220ba3a9eefee194e37ec1f14ae07 hi jus

[GENERAL] = any((select )) needs cast, why?

2011-11-12 Thread Frank van Vugt
L.S. Could someone point me to the formal reason why in: postgres=# select version(); version --- PostgreSQL 9.0.4 on x86_64-unknow

Re: [GENERAL] weird pg_statistic problem

2011-11-12 Thread Enrico Sirola
Hello Tom, Il giorno 11/nov/2011, alle ore 22.05, Tom Lane ha scritto: > Enrico Sirola writes: >> this morning I experienced a weird problem with our pgsql database (9.0.3): >> while performing a simple query, I receive the following error: >> Nov 11 10:24:09 postgres[23395]: [7-1] ERROR: miss

Re: [GENERAL] = any((select )) needs cast, why?

2011-11-12 Thread Tom Lane
Frank van Vugt writes: > Could someone point me to the formal reason why in: > the cast to int[ ] of the result row is needed here: > postgres=# select 1 = any((select ARRAY[1,2])::int[]); ANY(SELECT ...) normally means searching down the rows of the select result, where the select is expected to

[GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread Jerry Levan
I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2 I have a mac running 9.1.1. I then built dblink from the contrib directory and I did not see an install option in the make file. I tried copying the dblink.so file to the postgresql library directory but i cannot figure ou

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

2011-11-12 Thread Jeff Davis
On Tue, 2011-11-01 at 10:59 -0400, Chris Dumoulin wrote: > Indexes: > "item_pkey" PRIMARY KEY, btree (sig) > > 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

Re: [GENERAL] pg_dump -n switch lock schema from dml/ddl?

2011-11-12 Thread Jeff Davis
On Thu, 2011-11-10 at 11:46 -0500, Tony Capobianco wrote: > I'm testing out various pg_dump scenarios using the -n switch and I have > a few questions: > > - When using the -n switch, is the whole schema locked from all non-read > DML/DDL operations? No. > - Once the final table is dumped > (i.

[GENERAL] Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread Scott Mead
On Sat, Nov 12, 2011 at 1:02 PM, Jerry Levan wrote: > I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2 > > I have a mac running 9.1.1. > > I then built dblink from the contrib directory and I did not > see an install option in the make file. > The Makefile should be inc

[GENERAL] Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread Jerry Levan
On Nov 12, 2011, at 3:34 PM, Scott Mead wrote: > > On Sat, Nov 12, 2011 at 1:02 PM, Jerry Levan wrote: > I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2 > > I have a mac running 9.1.1. > > I then built dblink from the contrib directory and I did not > see an install

Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread John R Pierce
On 11/12/11 10:02 AM, Jerry Levan wrote: I have a mac running 9.1.1. I then built dblink from the contrib directory and I did not see an install option in the make file. did you build this 9.1.1 or is this a standard distribution? if you built it, did you install it with `make install` ?

[GENERAL] CLONE DATABASE (with copy on write?)

2011-11-12 Thread Clark C. Evans
Hello all! Our company has some headaches in our application development and deployment process. The chief problem is, "creating stages", which to this audience is, cloning a database efficiently, making and testing a few changes, perhaps recording the differences between databases, and then

[GENERAL] Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-12 Thread Cody Caughlan
I've run VACUUM ANALYZE on all my tables to make sure the house has been cleaned. I still see a lot of slow queries / commits, even on primary key lookups and well indexed tables. /Cody On Fri, Nov 11, 2011 at 11:04 PM, Cody Caughlan wrote: > Postgres 9.1.1, master with 2 slaves via streaming re

Re: [GENERAL] Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread Tom Lane
Jerry Levan writes: > On Nov 12, 2011, at 3:34 PM, Scott Mead wrote: >> The Makefile should be including the global did you try a 'make install' >> ? > I went back and did the make install from the dblink directory it installed > stuff in the share directory but invoking dblink functions fai

[GENERAL] Re: [GENERAL] Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

2011-11-12 Thread Jerry Levan
On Nov 12, 2011, at 5:49 PM, Tom Lane wrote: > Jerry Levan writes: >> On Nov 12, 2011, at 3:34 PM, Scott Mead wrote: >>> The Makefile should be including the global did you try a 'make >>> install' ? > >> I went back and did the make install from the dblink directory it installed >> stuff

Re: [GENERAL] Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-12 Thread Igor Polishchuk
I saw such behavior a few years ago on multiple very busy databases connected to the same EMC SAN. The SAN's cache got overwhelmed by the databases IO, and the storage latency went up significantly. I don't remember now what was the latency, but it was above 40ms. Is everything ok with your storag

Re: [GENERAL] CLONE DATABASE (with copy on write?)

2011-11-12 Thread Igor Polishchuk
I'm in a similar position, cloning a database multiple times to provide development and qa databases for multiple groups. A feature desired by Clark would greatly help many people with their development and qa databases. On the other hand, I imagine, a feature like this would not be easy to develo

Re: [GENERAL] Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-12 Thread Simon Riggs
On Sat, Nov 12, 2011 at 7:04 AM, Cody Caughlan wrote: > Postgres 9.1.1, master with 2 slaves via streaming replication. > > I've enabled slow query logging of 150ms and am seeing a large number > of slow COMMITs: > > 2011-11-12 06:55:02 UTC pid:30897 (28/0-0) LOG:  duration: 232.398 ms > statement

Re: [GENERAL] CLONE DATABASE (with copy on write?)

2011-11-12 Thread Simon Riggs
On Sat, Nov 12, 2011 at 9:40 PM, Clark C. Evans wrote: > Our company has some headaches in our application development > and deployment process.  The chief problem is, "creating stages", > which to this audience is, cloning a database efficiently, > making and testing a few changes, perhaps recor