[GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Jo
Hello, we have performance problems running several queries pon postgres 8.4 . Using the previous version (8.3) our queries performs well (The queries are quite complex, consisting of several sub-queries and various spatial functions). Using a new server with debian squeeze and postgres 8.4

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Hannes Erven
Jo, we have performance problems running several queries pon postgres 8.4 . Using the previous version (8.3) our queries performs well (The queries are quite complex, consisting of several sub-queries and various spatial functions). Are there some major changes from 8.3 to 8.4 that cause

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed.

2011-03-14 Thread Merlin Moncure
On Sun, Mar 13, 2011 at 4:37 PM, Rob Sargent robjsarg...@gmail.com wrote: Brian Hirt wrote: On Mar 13, 2011, at 12:05 PM, Dmitriy Igrishin wrote: Hey Viktor, 2011/3/13 Viktor Nagy viktor.n...@toolpart.hu mailto:viktor.n...@toolpart.hu    hi,    when trying to insert a long-long

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-14 Thread Igor Neyman
-Original Message- From: Andrew Sullivan [mailto:a...@crankycanuck.ca] Sent: Friday, March 11, 2011 5:02 PM To: pgsql-general@postgresql.org Subject: Re: How do you change the size of the WAL files? On Fri, Mar 11, 2011 at 12:58:30PM -0500, runner wrote: My boss is used to

[GENERAL] DBMS upgrade and backups

2011-03-14 Thread Alexander Pyhalov
Hello. Am I right that on PostgreSQL upgrade to new major version (e.g. from 9.0 to 9.1) I'll loose my backups (base backups and wal files will be useless)? So to go to past after DB upgrade I had to install old version(9.0), recover data and then upgrade DBMS software... What is the

Re: [GENERAL] DBMS upgrade and backups

2011-03-14 Thread Vibhor Kumar
On Mar 14, 2011, at 7:36 PM, Alexander Pyhalov wrote: Am I right that on PostgreSQL upgrade to new major version (e.g. from 9.0 to 9.1) I'll loose my backups (base backups and wal files will be useless)? Yes, those Backups would not be valid. So to go to past after DB upgrade I had to

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Jo
I set the work_mem to 100MB and the shared buffers are 2 GB The query plans are long and complex. I send the beginning of the two plans. Hope this helps to understand the differences. I assume the join strategy in 8.3 differs from the one in 8.4. * The

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Pavel Stehule
Hello 2011/3/14 Jo jl.n...@uni-bonn.de: I set the work_mem to 100MB and the shared buffers are 2 GB The query plans are long and complex. I send the beginning of the two plans. Hope this helps to understand the differences. I assume the join strategy in 8.3 differs from the one in 8.4.

Re: [GENERAL] DBMS upgrade and backups

2011-03-14 Thread Alexander Pyhalov
Hello. On 03/14/2011 17:38, Vibhor Kumar wrote: You won't be able to use the Data Directory of New Version for PG 9.0, you have to use your old backup. What is the preferred way to deal with this issue? I would recommend to take pg_dump backup with Filesystem Backup before any upgrade.

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread tv
Hello 2011/3/14 Jo jl.n...@uni-bonn.de: I set the work_mem to 100MB and the shared buffers are 2 GB The query plans are long and complex. I send the beginning of the two plans. Hope this helps to understand the differences. I assume the join strategy in 8.3 differs from the one in 8.4.

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Tom Lane
we have performance problems running several queries pon postgres 8.4 . Using the previous version (8.3) our queries performs well (The queries are quite complex, consisting of several sub-queries and various spatial functions). Two things that frequently bite people during an upgrade: 1.

[GENERAL] Autocommit off - commits/rollbacks

2011-03-14 Thread Vogt, Michael
Hey all I have a question, using the autocommit off option in postgres. As starting position I use a table called xxx.configuration using a unique id constraint. Why does postgres rollback the whole transaction after an error? I compared the behavior with oracle/hsql - those dbms commit whats

[GENERAL] primary key

2011-03-14 Thread Peter Evens
hello, i have a question about the PRIMARY KEY, how can we let it start from for example 1000 instead of 1? This is our program: CREATE TABLE hy3_pack ( hy3_id serial NOT NULL, hy3_serie_nummer text NOT NULL, hy3_barcode text NOT NULL, hy3_type_vulling text NOT NULL, hy3_tarra_gewicht

[GENERAL] Primary key

2011-03-14 Thread Peter Evens
hello, i have a question about the PRIMARY KEY, how can we let it start from for example 1000 instead of 1? This is our program: CREATE TABLE hy3_pack ( hy3_id serial NOT NULL, hy3_serie_nummer text NOT NULL, hy3_barcode text NOT NULL, hy3_type_vulling text NOT NULL, hy3_tarra_gewicht

[GENERAL] Autocommit off - commits/rollbacks

2011-03-14 Thread Vogt, Michael
Hey all I have a question, using the autocommit off option in postgres. As starting position I use a table called xxx.configuration using a unique id constraint. Why does postgres rollback the whole transaction after an error? I compared the behavior with oracle/hsql - those dbms commit whats

Re: [GENERAL] primary key

2011-03-14 Thread Raymond O'Donnell
On 14/03/2011 07:57, Peter Evens wrote: hello, i have a question about the PRIMARY KEY, how can we let it start from for example 1000 instead of 1? This is our program: CREATE TABLE hy3_pack ( hy3_id serial NOT NULL, hy3_serie_nummer text NOT NULL, hy3_barcode text NOT NULL,

Re: [GENERAL] Select for update with offset interferes with concurrent transactions

2011-03-14 Thread Yngve N. Pettersen (Developer Opera Software ASA)
Hello all, Just a quick update of how it went. I ended up using code similar to a combination of Andy Colson's and David Johnston's suggestions below, and performance is back at what is was before. Thanks for the suggestions BTW: AFAICT I never got a response from Tom Lane about whether it was

Re: [GENERAL] primary key

2011-03-14 Thread Adrian Klaver
On Monday, March 14, 2011 12:57:07 am Peter Evens wrote: hello, i have a question about the PRIMARY KEY, how can we let it start from for example 1000 instead of 1? This is our program: CREATE TABLE hy3_pack ( hy3_id serial NOT NULL, hy3_serie_nummer text NOT NULL, hy3_barcode text

Re: [GENERAL] Primary key

2011-03-14 Thread Allan Kamau
On Mon, Mar 14, 2011 at 10:58 AM, Peter Evens pe...@bandit.be wrote: hello, i have a question about the PRIMARY KEY, how can we let it start from for example 1000 instead of 1? This is our program: CREATE TABLE hy3_pack ( hy3_id serial NOT NULL, hy3_serie_nummer text NOT NULL,

Re: [GENERAL] Primary key

2011-03-14 Thread Raymond O'Donnell
On 14/03/2011 15:35, Allan Kamau wrote: CREATE SEQUENCE hy3_pack_seq MINVALUE 1000; CREATE TABLE hy3_pack ( hy3_id INTEGER NOT NULL DEFAULT nextval('hy3_pack_seq') -- or hy3_id BIGINT NOT NULL DEFAULT nextval('hy3_pack_seq') That's what SERIAL does for you, in one go - it's just syntactic

Re: [GENERAL] Primary key

2011-03-14 Thread Raymond O'Donnell
On 14/03/2011 15:56, Raymond O'Donnell wrote: On 14/03/2011 15:35, Allan Kamau wrote: CREATE SEQUENCE hy3_pack_seq MINVALUE 1000; CREATE TABLE hy3_pack ( hy3_id INTEGER NOT NULL DEFAULT nextval('hy3_pack_seq') -- or hy3_id BIGINT NOT NULL DEFAULT nextval('hy3_pack_seq') That's what SERIAL

Re: [GENERAL] Postgres 8.3 vs. 8.4 - Query plans and performance

2011-03-14 Thread Jo
Hello, that's the 8.4 query plan: http://explain.depesz.com/s/dO7 The locale of the two databases is the same: SHOW LC_COLLATE command gives the locale: de_DE.UTF-8. Regards, Jo On 14.03.2011 16:04, t...@fuzzy.cz wrote: Hello 2011/3/14 Jojl.n...@uni-bonn.de: I set the work_mem to

Re: [GENERAL] Select for update with offset interferes with concurrent transactions

2011-03-14 Thread Andy Colson
On 3/14/2011 10:13 AM, Yngve N. Pettersen (Developer Opera Software ASA) wrote: Hello all, Just a quick update of how it went. I ended up using code similar to a combination of Andy Colson's and David Johnston's suggestions below, and performance is back at what is was before. Thanks for the

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-14 Thread Alexander Pyhalov
Hello. On 03/14/2011 12:24, Vogt, Michael wrote: I have a question, using the autocommit off option in postgres. As starting position I use a table called xxx.configuration using a unique id constraint. Why does postgres rollback the whole transaction after an error? I compared the behavior

Re: [GENERAL] Primary key

2011-03-14 Thread Joshua D. Drake
On Mon, 2011-03-14 at 16:03 +, Raymond O'Donnell wrote: On 14/03/2011 15:56, Raymond O'Donnell wrote: On 14/03/2011 15:35, Allan Kamau wrote: CREATE SEQUENCE hy3_pack_seq MINVALUE 1000; CREATE TABLE hy3_pack ( hy3_id INTEGER NOT NULL DEFAULT nextval('hy3_pack_seq') -- or hy3_id

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-14 Thread Andrew Sullivan
On Mon, Mar 14, 2011 at 03:55:37PM +0100, Vogt, Michael wrote: Why does postgres rollback the whole transaction after an error? I compared the behavior with oracle/hsql - those dbms commit whats possible. A transaction is supposed to commit or rollback. If you want to hold on to something

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed.

2011-03-14 Thread Viktor Nagy
thanks, this worked. On Sun, Mar 13, 2011 at 7:05 PM, Dmitriy Igrishin dmit...@gmail.com wrote: Hey Viktor, 2011/3/13 Viktor Nagy viktor.n...@toolpart.hu hi, when trying to insert a long-long value, I get the following error: index row size 3120 exceeds maximum 2712 for index

Re: [GENERAL] Select for update with offset interferes with concurrent transactions

2011-03-14 Thread Merlin Moncure
On Tue, Feb 1, 2011 at 11:18 AM, Tom Lane t...@sss.pgh.pa.us wrote: Yngve Nysaeter Pettersen yn...@opera.com writes: To avoid having the processes trample each other's queries (the first attempt was to select the first matching entries of the table, which caused one to block all other

Re: [GENERAL] list all members in a tablespace

2011-03-14 Thread Michael Andrew Babb
Thanks Raghavendra. I tried the query and it seemed to be returning the indices and sequences in each tablespace. I'll keep trying to get the list of tablespaces. Thanks for your help! Mike From: Raghavendra [mailto:raghavendra@enterprisedb.com] Sent: Wednesday, March 09, 2011 5:15 PM To:

Re: [GENERAL] DBMS upgrade and backups

2011-03-14 Thread Vick Khera
On Mon, Mar 14, 2011 at 10:06 AM, Alexander Pyhalov a...@rsu.ru wrote: Am I right that on PostgreSQL upgrade to new major version (e.g. from 9.0 to 9.1) I'll loose my backups (base backups and wal files will be useless)? So to go to past after DB upgrade  I had to install old version(9.0),

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread hubert depesz lubaczewski
On Fri, Mar 11, 2011 at 11:13:43AM -0500, Noah Misch wrote: gdb -ex=bt /path/to/bin/postgres $pid /dev/null hi so, let me remind what's what. I wrote a script, that every 15 seconds, checks system for Pg backends in PARSE state. If there are more than 100 of them, script randombly chooses 10

Re: [GENERAL] DBMS upgrade and backups

2011-03-14 Thread Michael Nolan
On Mon, Mar 14, 2011 at 1:38 PM, Vick Khera vi...@khera.org wrote: On Mon, Mar 14, 2011 at 10:06 AM, Alexander Pyhalov a...@rsu.ru wrote: Am I right that on PostgreSQL upgrade to new major version (e.g. from 9.0 to 9.1) I'll loose my backups (base backups and wal files will be useless)? So

[GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread gene . poole
Just a little background: We're running Red Hat Satellite Server and it's used to provision our servers (both physical and virtual). It works great and we have no issues with it *except* It will only provision Red Hat. Why this question: We've been directed by our management to examine the

[GENERAL] Create a view with variable amount of columns depending on the rows of a table

2011-03-14 Thread Stefan Gündhör
Hi, If I have following tables for example: # Main Table: id(id/pk) | geometry --- 1 | ... # Additional Attribute Table: name(id/pk) | value --- date_added | 20.12.1988 name | Vienna # m:n table: mainTableID | attrTableID

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Devrim GÜNDÜZ
On Mon, 2011-03-14 at 14:43 -0400, gene.po...@macys.com wrote: We're running Red Hat Satellite Server and it's used to provision our servers (both physical and virtual). It works great and we have no issues with it *except* It will only provision Red Hat. Why this question: We've

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Andrew Sullivan
On Mon, Mar 14, 2011 at 02:43:17PM -0400, gene.po...@macys.com wrote: Is there a recent tutorial, white paper, how to on move/migrate from Oracle to PostgreSQL? I can get the Oracle schema DDL by pointing our Data Modeling software at the Red Hat Satellite server and extracting the DDL.

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Stephen Frost
Gene, * gene.po...@macys.com (gene.po...@macys.com) wrote: Is there a recent tutorial, white paper, how to on move/migrate from Oracle to PostgreSQL? It's typically not hard, but it depends on what you're doing w/ Oracle. Specifically, things like stored procedures (PL/SQL) may require

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread John R Pierce
On 03/14/11 11:43 AM, gene.po...@macys.com wrote: Is there a recent tutorial, white paper, how to on move/migrate from Oracle to PostgreSQL? I can get the Oracle schema DDL by pointing our Data Modeling software at the Red Hat Satellite server and extracting the DDL. It will take that Oracle

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= dev...@gunduz.org writes: On Mon, 2011-03-14 at 14:43 -0400, gene.po...@macys.com wrote: [ wants to port Red Hat Satellite to Postgres ] Please see http://spacewalk.redhat.com/ Yeah. I'm on the fringes of that port effort, and it is *not* trivial;

Re: [GENERAL] Create a view with variable amount of columns depending on the rows of a table

2011-03-14 Thread Merlin Moncure
2011/3/14 Stefan Gündhör ste...@guendhoer.com: Hi, If I have following tables for example: # Main Table: id(id/pk) | geometry --- 1           | ... # Additional Attribute Table: name(id/pk) | value --- date_added | 20.12.1988 name          

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread Martijn van Oosterhout
On Mon, Mar 14, 2011 at 07:49:46PM +0100, hubert depesz lubaczewski wrote: These 60 were summarized, and output is available here: http://www.depesz.com/various/locks.summary.txt as you can seem, in 48 cases backend process was in semop(), which relates directly to my previous findings with

Re: [GENERAL] Autocommit off - commits/rollbacks

2011-03-14 Thread David Johnston
Set autocommit to true/on. That will give you the desired behavior of allowing all those things that succeed to remain committed. David J. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Vogt, Michael Sent: Monday,

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread hubert depesz lubaczewski
On Mon, Mar 14, 2011 at 10:21:27PM +0100, Martijn van Oosterhout wrote: The common factor seems to be lots of index locks. Do you have very many indexes? $ select count(*) from pg_class where relkind = 'i'; count --- 450 (1 row) $ select count(*) from pg_class where relkind = 'r';

[GENERAL] base backup and tar problems with disappearing files.

2011-03-14 Thread Rajesh Kumar Mallah
Dear Friends, While taking online basebackup we ignore tar exit codes of 1 . However under certain circumstances tar exits we code '2' which stands for 'Fatal Errors' . Eg in case of Cannot stat: No such file or directory encountered while taking backup of the pgdatadir . My question is can we

[GENERAL] Partitioned Database and Choosing Subtables

2011-03-14 Thread Bill Thoen
I've got a ver 8.4.5 partitioned data base with records organized by US state, so the partitions are set up by state. When I query this database and include the key field that tells postgres what partition you , everything works as I expect. It searches only the specified partition, and it's

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-14 Thread Christophe Pettus
On Mar 14, 2011, at 8:30 PM, Bill Thoen wrote: I've got a ver 8.4.5 partitioned data base with records organized by US state, so the partitions are set up by state. When I query this database and include the key field that tells postgres what partition you , everything works as I expect.

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread Noah Misch
On Mon, Mar 14, 2011 at 07:49:46PM +0100, hubert depesz lubaczewski wrote: I wrote a script, that every 15 seconds, checks system for Pg backends in PARSE state. If there are more than 100 of them, script randombly chooses 10 of them, and runs gdb -batch -quiet -ex=bt /usr/bin/postgres PID on

Re: [GENERAL] Huge spikes in number of connections doing PARSE

2011-03-14 Thread Noah Misch
On Mon, Mar 14, 2011 at 10:21:27PM +0100, Martijn van Oosterhout wrote: On Mon, Mar 14, 2011 at 07:49:46PM +0100, hubert depesz lubaczewski wrote: These 60 were summarized, and output is available here: http://www.depesz.com/various/locks.summary.txt as you can seem, in 48 cases backend

[GENERAL] pgstat wait timeout

2011-03-14 Thread Tory M Blue
I know you can't do much with this information, but maybe you can help me acquire the information that is needed. This started in 8.4 and trying to figure it out Fedora 12, Postgres 8.4.4 with slony. Although I don't see any panics or errors other then these Warnings, but I did see a dead lock