Re: [GENERAL] A note on pg_upgrade and missing "pg_upgrade_support.so"

2010-09-25 Thread Ian Barwick
2010/9/21 Bruce Momjian : > Bruce Momjian wrote: >> Ian Barwick wrote: >> > Hi >> > >> > Just a quick note for anyone else building 9.0 from source and >> > experimenting >> > with pg_upgrade - if you get a message like the following when running the >> > pg_upgrade binary: >> > >> > pg_upgrade_su

Re: [GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Tom Lane
> "Andrus" writes: >> Should I try 9.0 release > No, it's still busted in HEAD :-(. Probably won't be too hard to fix, > but I need to go find the bug. Here's the patch if it helps. regards, tom lane diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend

Re: [GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Tom Lane
"Andrus" writes: >> Could we see a complete test case for this? No one can guess at the >> tables, indexes, etc that might be needed to provoke the problem. > Complete testcase is below. Thanks, I can reproduce it now. > Should I try 9.0 release No, it's still busted in HEAD :-(. Probably wo

Re: [GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Andrus
Could we see a complete test case for this? No one can guess at the tables, indexes, etc that might be needed to provoke the problem. Complete testcase is below. Should I try 9.0 release or other idea how to fix without removing primary key and keeping query structure so that query runs in all

Re: [GENERAL] Streaming Replication

2010-09-25 Thread Thom Brown
On 25 September 2010 21:34, Jason Long wrote: > I have several databases running under on Postgres 9.0 installation in > production.  Is there a way to specify with which onces will be replicated > on another server or must all of them be included? Yes, they must all be included as it works at th

[GENERAL] Streaming Replication

2010-09-25 Thread Jason Long
I have several databases running under on Postgres 9.0 installation in production. Is there a way to specify with which onces will be replicated on another server or must all of them be included?

Re: [GENERAL] psql copy command - 1 char limitation on delimiter

2010-09-25 Thread rey
On 09/25/2010 10:03 AM, Tom Lane wrote: rey writes: Why limit this to a single character? Performance. Believe it or not, breaking fields at the delimiter is a significant factor in COPY speed. regards, tom lane True, but just for 5% to 10% degradation

Re: [GENERAL] pg 8.4 crashing.

2010-09-25 Thread Tom Lane
Scott Marlowe writes: >> On Thu, Sep 23, 2010 at 2:17 PM, Tom Lane wrote: >>> If you can apply this patch: >>> http://archives.postgresql.org/pgsql-committers/2010-08/msg00365.php >>> it should tell you which index page is causing the problem.  Then >>> please dump that page with pg_filedump and

Re: [GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Tom Lane
"Andrus" writes: > In 9.0 RC1 query below causes error > Variable not found in subplan target lists Could we see a complete test case for this? No one can guess at the tables, indexes, etc that might be needed to provoke the problem. regards, tom lane -- Sent via pgsq

Re: [GENERAL] Index on points

2010-09-25 Thread Tom Lane
Jeff Davis writes: > There's no reason that there couldn't be a point <@ box operator in the > opclass, but nobody really uses these geometric types that come with > core postgres (at least, not that I can tell). Actually, as of 9.0 there is a point_ops opclass for GIST, with these indexable oper

Re: [GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Dmitriy Igrishin
Hey Andrus, Did you tried it on 9.0 release? -- // Dmitriy.

[GENERAL] 9.0RC1 error variable not found in subplan target lists

2010-09-25 Thread Andrus
In 9.0 RC1 query below causes error Variable not found in subplan target lists In earlier version this query works OK. How to fix ? Andrus. SELECT * FROM (select 1) xtoode LEFT JOIN (SELECT hmguid.toode, COALESCE(hinnamtr.hinnak,klient.hinnak ) AS hinnak FROM ( SELECT hmhinnak.tood

Re: [GENERAL] Index on points

2010-09-25 Thread Jeff Davis
On Sat, 2010-09-25 at 09:18 +0200, A B wrote: > fleet (id bigserial primary key, location point); > ... > CREATE INDEX fleet_location ON fleet USING GIST ( box(location,location) ); > > but I still get almost exaclty the same run time of the query > > > explain analyze select count(1) from flee

Re: [GENERAL] psql copy command - 1 char limitation on delimiter

2010-09-25 Thread Tom Lane
rey writes: > Why limit this to a single character? Performance. Believe it or not, breaking fields at the delimiter is a significant factor in COPY speed. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your s

Re: [GENERAL] Listen and do something daemon

2010-09-25 Thread Josh Kupershmidt
On Fri, Sep 24, 2010 at 9:42 PM, KM wrote: > Does this program already exist? > >   $ listen-and-do --database=foo --listen-for="somenotification" \ >      --then-do="some-script" > > It will daemonize itself, issue a 'LISTEN somenotification' on the > database foo, and on each NOTIFY will run som

Re: [GENERAL] How to use pg_restore with *.sql file?

2010-09-25 Thread Andre Lopes
Thanks a lot! It works. On Sat, Sep 25, 2010 at 1:23 PM, Scott Marlowe wrote: > On Sat, Sep 25, 2010 at 6:19 AM, Andre Lopes > wrote: > > Hi, > > > > I have generate an *.sql file with the command: > > > > [quote] > > pg_dump -a --inserts databasename > exportfilename.sql > > [/quote] > > > > H

Re: [GENERAL] How to use pg_restore with *.sql file?

2010-09-25 Thread Dmitriy Igrishin
Hey Andre, You should not use pg_restore with plain format dump. Use psql for it. // Dmitriy.

Re: [GENERAL] How to use pg_restore with *.sql file?

2010-09-25 Thread Scott Marlowe
On Sat, Sep 25, 2010 at 6:19 AM, Andre Lopes wrote: > Hi, > > I have generate an *.sql file with the command: > > [quote] > pg_dump -a --inserts databasename > exportfilename.sql > [/quote] > > How can I use the pg_restore to import the data to the database? Don't. Just use psql with plain sql d

[GENERAL] How to use pg_restore with *.sql file?

2010-09-25 Thread Andre Lopes
Hi, I have generate an *.sql file with the command: [quote] pg_dump -a --inserts databasename > exportfilename.sql [/quote] How can I use the pg_restore to import the data to the database? I have tried: [quote] pg_restore -d databasename exportfilename.sql [/quote] But without success... Wha

Re: [GENERAL] Index on points

2010-09-25 Thread Richard Huxton
On 23/09/10 11:45, A B wrote: Hello. If I have a table like this create table fleet ( ship_id integer, location point); and fill it with a lot of ships and their locations and then want to create an index on this to speed up operations on finding ships within a certain region (let's say its

Re: [GENERAL] UPDATE/DELETE with ORDER BY and LIMIT

2010-09-25 Thread Alban Hertroys
On 24 Sep 2010, at 21:20, Bartłomiej Korupczyński wrote: > Hi guys, > > I've found some posts from 2007 about UPDATE/DELETE ... LIMIT N syntax > and I'd like to raise it again. Current PostgreSQL of UPDATE/DELETE > implement RETURNING statement, so extending by ORDER and LIMIT would be > really u

Re: [GENERAL] How to dump only the the data without schema?

2010-09-25 Thread Dmitriy Igrishin
Hey Andre, Try pg_dump -a --inserts ... // Dmitriy

[GENERAL] How to dump only the the data without schema?

2010-09-25 Thread Andre Lopes
Hi, I need to generate the dump of a PostgreSQL database only with the data with INSERT's. It is possible to do this? Best Regards,

Re: [GENERAL] Libpq memory leak

2010-09-25 Thread Dmitriy Igrishin
Hey Sergey, As i can understand Vladimir, he have many clients reading bytea in one > server like this and he is trying to reduce memory consumption. > > Why not use large objects for this purpose? // Dmitriy.

Re: [GENERAL] Libpq memory leak

2010-09-25 Thread Dmitriy Igrishin
Hey Sergey, As i can understand Vladimir, he have many clients reading bytea in one > server like this and he is trying to reduce memory consumption. > > Why not use large objects for this purpose? -- Regards, Dmitriy

Re: [GENERAL] Index on points

2010-09-25 Thread A B
But how do I do it without Postgis? Right now I have a table fleet (id bigserial primary key, location point); and I have filled it with random data and then tried selecting explain analyze select count(1) from fleet where location <@ box(point(300,300),point(600,600)); to gather runningtime da

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-25 Thread Sandeep Srinivasa
@OP - One of the things you _might_ be interested in is the difference in tracing and performance framework between Oracle and Postgres. There was a recent thread about it - http://osdir.com/ml/pgsql-general/2010-09/msg00308.html You could get your company to sponsor some work on that front.