[GENERAL] libecpg versions and libecpg_compat

2010-02-04 Thread Rob Newton
Hi list, I've been building ECPG (embedded SQL/C) programs on a system with Pg version 8.0 installed. When I tried to run them recently on version 8.4 I found that there was a libecpg library incompatibility: v8.0 uses libecpg.so.5, whereas 8.4 uses libecpg.so.6. Then I noticed libecpg_com

Re: [GENERAL] Verify a record has a column in a plpgsql trigger

2010-02-04 Thread Tim Landscheidt
Mike Ginsburg wrote: > [...] > Thanks for the help! I'll look into the exceptions to see > how expensive they are. On a related note, I was just told > by our sysadmins that pg 8.4 might not be installed by the > time this needs to be rolled out, leaving me in a bind since > I have been using "

Re: [GENERAL] playr (or similar tool)?

2010-02-04 Thread Ben Chobot
There was a thread about this within the last month or two. Check the archives, but as I recall the consensus was basically that there are several things in early stages, but until they're done, tsung is as good as it gets today. :( On Feb 4, 2010, at 3:19 PM, Kevin Kempter wrote: > Hi All; >

[GENERAL] playr (or similar tool)?

2010-02-04 Thread Kevin Kempter
Hi All; I need a tool that will duplicate ALL messages from one db to another (including begin, commit, etc). I think Playr does (did) this but the myyearbook links from the past pg conference talks (the one from PG East 2009 in particular) no longer work. Anyone know how to get Playr? If i

Re: [GENERAL] Shall I apply normalization in the following case?

2010-02-04 Thread Jeff Davis
On Wed, 2010-02-03 at 23:56 -0200, Jorge Godoy wrote: > You can always normalize and not use an artificial key. > > You'd end up with: > > > measurement (normalization) > === > id | value | measurement_unit_id | measurement_type_id > --

Re: [GENERAL] Shall I apply normalization in the following case?

2010-02-04 Thread Jeff Davis
On Wed, 2010-02-03 at 17:20 -0800, Yan Cheng Cheok wrote: > For example, for the following table, > > > measurement (without normalization) > === > id | value | measurement_unit | measurement_type > > 1 0.23 mmwid

Re: [GENERAL] Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487

2010-02-04 Thread Owen Hartnett
On Feb 4, 2010, at 3:47 PM, Magnus Hagander wrote: > 2010/2/4 Owen Hartnett : >> >> On Aug 9, 2009, at 3:10 PM, Magnus Hagander wrote: >> >>> On Sun, Aug 9, 2009 at 10:22, Abraham, Danny wrote: Does anybody have a proven way to regenerate this problem? SO that I can tell that th

Re: [GENERAL] Verify a record has a column in a plpgsql trigger

2010-02-04 Thread Mike Ginsburg
Merlin Moncure wrote: On Thu, Feb 4, 2010 at 11:41 AM, Mike Ginsburg wrote: I have a plpgsql function that serves as a change log for a few tables in my db (8.4.2). In most of the tables that I am logging, there is an "editor" column that stores the ID of the user who made the change, so as

Re: [GENERAL] Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487

2010-02-04 Thread Owen Hartnett
On Aug 9, 2009, at 3:10 PM, Magnus Hagander wrote: > On Sun, Aug 9, 2009 at 10:22, Abraham, Danny wrote: >> Does anybody have a proven way to regenerate this problem? >> >> SO that I can tell that the patch really does fix it? > > No. That's the reason it has taken so long to figure out how to

Re: [GENERAL] Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487

2010-02-04 Thread Magnus Hagander
2010/2/4 Owen Hartnett : > > On Aug 9, 2009, at 3:10 PM, Magnus Hagander wrote: > >> On Sun, Aug 9, 2009 at 10:22, Abraham, Danny wrote: >>> Does anybody have a proven way to regenerate this problem? >>> >>> SO that I can tell that the patch really does fix it? >> >> No. That's the reason it has ta

Re: [GENERAL] Literals in foreign key definitions

2010-02-04 Thread Tim Landscheidt
Alban Hertroys wrote: > [...] > Now the intent here is to restrict foreign keys referencing the base class to > unitclass records that describe a baseclass and to restrict foreign keys > referencing a derived class to unitclass records that do NOT describe a > baseclass. > Basically I'm trying

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Adrian Klaver
On 02/04/2010 08:28 AM, Wang, Mary Y wrote: Hi PostgreSQL Community, Are there any good PostgreSQL courses offered in the US Westcoast area? Would be great if there is one in California. Company's budget is tight. However, if the course is really great (need recommendations from the communi

Re: [GENERAL] Verify a record has a column in a plpgsql trigger

2010-02-04 Thread Merlin Moncure
On Thu, Feb 4, 2010 at 11:41 AM, Mike Ginsburg wrote: > I have a plpgsql function that serves as a change log for a few tables in my > db (8.4.2).  In most of the tables that I am logging, there is an "editor" > column that stores the ID of the user who made the change, so as part of the > functio

Re: [GENERAL] How to set default database

2010-02-04 Thread Scott Mead
On Thu, Feb 4, 2010 at 1:40 PM, Krzysztof Walkiewicz wrote: > Hello! > > I created database "krzysztof" for practice postgresql. After few days i > deleted that database and i created the next one "cwiczebna". Now when I > type "psql" i get strange info, something like: "CRITICAL: base "krzyszto

Re: [GENERAL] How to set default database

2010-02-04 Thread Adrian Klaver
On 02/04/2010 10:40 AM, Krzysztof Walkiewicz wrote: Hello! I created database "krzysztof" for practice postgresql. After few days i deleted that database and i created the next one "cwiczebna". Now when I type "psql" i get strange info, something like: "CRITICAL: base "krzysztof" don't exist". N

Re: [GENERAL] Need Advice In Improving Database Disc Usage

2010-02-04 Thread Vick Khera
On Tue, Feb 2, 2010 at 11:00 PM, Yan Cheng Cheok wrote: > (1) Is there any need for me to create idx_fk_measurement_type_id and > idx_fk_measurement_unit_id > > The above 2 are the index for measurement's foreign key. However, these 2 > foreign key are only used in JOIN statement, but never used

[GENERAL] How to set default database

2010-02-04 Thread Krzysztof Walkiewicz
Hello! I created database "krzysztof" for practice postgresql. After few days i deleted that database and i created the next one "cwiczebna". Now when I type "psql" i get strange info, something like: "CRITICAL: base "krzysztof" don't exist". Now i need to type "psql cwiczebna" to log in to

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Scott Marlowe
On Thu, Feb 4, 2010 at 11:41 AM, Gauthier, Dave wrote: > analyze?  Does the empirical data the optimizer use develop good queries get > updated with/after a restore? Nope. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.pos

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Alvaro Herrera
Gauthier, Dave escribió: > analyze? Does the empirical data the optimizer use develop good queries get > updated with/after a restore? Not automatically, you have to invoke it manually. (In recent releases, autovacuum would do it, but 7.1 didn't have it). -- Alvaro Herrera

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Scott Marlowe
On Thu, Feb 4, 2010 at 9:28 AM, Wang, Mary Y wrote: > Hi PostgreSQL Community, > > Are there any good PostgreSQL courses offered in the US Westcoast area?   > Would be great if there is one in California. > Company's budget is tight.  However, if the course is really great (need > recommendation

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Gauthier, Dave
analyze? Does the empirical data the optimizer use develop good queries get updated with/after a restore? -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Scott Marlowe Sent: Thursday, February 04, 2010 1:32 PM To: Wang

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Joe Conway
On 02/04/2010 10:32 AM, Scott Marlowe wrote: > On Thu, Feb 4, 2010 at 8:54 AM, Wang, Mary Y wrote: >> Hi, >> >> I restored my database. However, I noticed performance is poor as compared >> to before. >> Are there some easy things that I can do to improve the performance (besides >> rewriting t

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Scott Marlowe
On Thu, Feb 4, 2010 at 8:54 AM, Wang, Mary Y wrote: > Hi, > > I restored my database.  However, I noticed performance is poor as compared > to before. > Are there some easy things that I can do to improve the performance (besides > rewriting the code)? > > My pgversion is 7.1.3 (I know, I know t

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Greg Smith
Wang, Mary Y wrote: Are there any good PostgreSQL courses offered in the US Westcoast area? Would be great if there is one in California. There is a list of upcoming training events from various members of the PostgreSQL community available at http://www.postgresql.org/about/eventarchiv

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Scott Mead
Mary, EnterpriseDB (my employer) runs both public and custom training classes: http://www.enterprisedb.com/tservices/training/schedule.do If you're interested, let me know and I'll get you talking to someone asap. --Scott Mead scott.m...@enterprisedb.com On Thu, Feb 4, 2010 at 12:06 PM, Wang,

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Wang, Mary Y
Hi Rich, I'm a database admin who needs to install and maintain postgres for a application. I'm also an application developer. As for now, I need to have more knowledge about being a Postgresql database admin. I'm also very interested in the database performance tuning area. I do have abo

Re: [GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Rich Shepard
On Thu, 4 Feb 2010, Wang, Mary Y wrote: Are there any good PostgreSQL courses offered in the US Westcoast area? Would be great if there is one in California. Company's budget is tight. However, if the course is really great (need recommendations from the community), travel any where in the US

[GENERAL] Verify a record has a column in a plpgsql trigger

2010-02-04 Thread Mike Ginsburg
I have a plpgsql function that serves as a change log for a few tables in my db (8.4.2). In most of the tables that I am logging, there is an "editor" column that stores the ID of the user who made the change, so as part of the function I set editor := NEW.editor; There are a few of the tabl

[GENERAL] Any Good Postgresql Courses Offered in the US Area?

2010-02-04 Thread Wang, Mary Y
Hi PostgreSQL Community, Are there any good PostgreSQL courses offered in the US Westcoast area? Would be great if there is one in California. Company's budget is tight. However, if the course is really great (need recommendations from the community), travel any where in the US is OK too. I

Re: [GENERAL] Postgres wal shipping from 8.33 to 8.42.

2010-02-04 Thread Scott Marlowe
On Thu, Feb 4, 2010 at 8:58 AM, Thom Brown wrote: > On 4 February 2010 15:54, Scott Marlowe wrote: >> On Thu, Feb 4, 2010 at 7:54 AM, Chris Barnes >> wrote: >>> We are trying to minimize our downtime in production to upgrade from 8.33 to >>> 8.42. >>> >>> What we would like to be able to do is t

Re: [GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Thom Brown
On 4 February 2010 15:54, Wang, Mary Y wrote: > Hi, > > I restored my database.  However, I noticed performance is poor as compared > to before. > Are there some easy things that I can do to improve the performance (besides > rewriting the code)? > > My pgversion is 7.1.3 (I know, I know that I

Re: [GENERAL] Postgres wal shipping from 8.33 to 8.42.

2010-02-04 Thread Thom Brown
On 4 February 2010 15:54, Scott Marlowe wrote: > On Thu, Feb 4, 2010 at 7:54 AM, Chris Barnes > wrote: >> We are trying to minimize our downtime in production to upgrade from 8.33 to >> 8.42. >> >> What we would like to be able to do is this: >> Upgrade the slave we are currently shipping to, to

[GENERAL] Performance Tuning - Any easy things that I can do ?

2010-02-04 Thread Wang, Mary Y
Hi, I restored my database. However, I noticed performance is poor as compared to before. Are there some easy things that I can do to improve the performance (besides rewriting the code)? My pgversion is 7.1.3 (I know, I know that I need to upgrade). Thanks Mary -- Sent via pgsql-general

Re: [GENERAL] Postgres wal shipping from 8.33 to 8.42.

2010-02-04 Thread Scott Marlowe
On Thu, Feb 4, 2010 at 7:54 AM, Chris Barnes wrote: > We are trying to minimize our downtime in production to upgrade from 8.33 to > 8.42. > > What we would like to be able to do is this: > Upgrade the slave we are currently shipping to, to version 8.4.2. Continue > to pitr to this server. And swi

Re: [GENERAL] Shall I apply normalization in the following case?

2010-02-04 Thread Lew
Sim Zacks wrote: 2) querying on an int is quicker then querying on a string, so if you query on the values without the join you will have better performance. The point of Jorge's approach is that it allows a query without a join. With the OP's normalization, using integer keys, a join was requ

Re: [GENERAL] Postgres wal shipping from 8.33 to 8.42.

2010-02-04 Thread A. Kretschmer
In response to Chris Barnes : > We are trying to minimize our downtime in production to upgrade from 8.33 to > 8.42. > > What we would like to be able to do is this: > Upgrade the slave we are currently shipping to, to version 8.4.2. Continue to > pitr to this server. And switch over and then upg

Re: [GENERAL] Versions RSS page is missing version(s)

2010-02-04 Thread Magnus Hagander
On Mon, Feb 1, 2010 at 15:33, Greg Sabino Mullane wrote: > >>> I'm not sure how useful that is. Surely while we encourage people to run >>> a recent major version, we also want to encourage people who will not >>> or cannot upgrade to at least be running the latest revision of a branch, >>> no mat

Re: [GENERAL] Literals in foreign key definitions

2010-02-04 Thread Tom Lane
Alban Hertroys writes: > FOREIGN KEY (base, true) REFERENCES unitclass (name, is_baseclass), > FOREIGN KEY (derived, false) REFERENCES unitclass(name, is_baseclass) > I can of course add a few triggers to force that constraint, but I think it > would be nice if the above syntax could be

[GENERAL] Postgres wal shipping from 8.33 to 8.42.

2010-02-04 Thread Chris Barnes
We are trying to minimize our downtime in production to upgrade from 8.33 to 8.42. What we would like to be able to do is this: Upgrade the slave we are currently shipping to, to version 8.4.2. Continue to pitr to this server. And switch over and then upgrade the master. My question is,

Re: [GENERAL] confusting results from pg_database_size

2010-02-04 Thread Adrian Klaver
On Thursday 04 February 2010 1:52:36 am AutoVHC Dev Team wrote: > As part of an testing an archive solution I've updated and deleted 3 or 4 > million rows in different tables. I wanted to see how much this shrunk the > database size by running, so I ran a VACUUM FULL FREEZE ANALYZE on both > databa

[GENERAL] Literals in foreign key definitions

2010-02-04 Thread Alban Hertroys
Hello all, I was trying something on my 8.3 server that's a bit controversial, and I wasn't surprised it didn't work. I think it would be nice if it were possible though... The case at hand is that I have a table: CREATE TABLE unitclass ( name TEXT NOT NULL PRIMARY KEY, is_baseclass BO

Re: [GENERAL] serial columns with replication/cluster

2010-02-04 Thread Jorge Godoy
Sean, take a look at UUID type. It might suit you better than serial. Changing the increment also works, but puts a lot of restrictions on you (such as planning to prevent collision, having to change the increment on several nodes when adding a new node, etc.). Regards, -- Jorge Godoy O

[GENERAL] Setting permissions to access schema and language

2010-02-04 Thread Jignesh Shah
Hi, I know how to set the permissions for tables. Could anyone tell me how to restrict people accessing and creating schemas? Also, is it possible to restrict language permissions? Suppose I want only few users should use C language and for rest of users it should be missing. How can I restrict pe

[GENERAL] confusting results from pg_database_size

2010-02-04 Thread AutoVHC Dev Team
As part of an testing an archive solution I've updated and deleted 3 or 4 million rows in different tables. I wanted to see how much this shrunk the database size by running, so I ran a VACUUM FULL FREEZE ANALYZE on both databases - this took a long time, which is ok considering the number of rows

Re: [GENERAL] using new Hstore in PG8.4

2010-02-04 Thread Marek Lewczuk
W dniu 2010-02-04 10:46, Marek Lewczuk pisze: Hello, there are a lot of improvements in hstore, that is planned for PG8.5 - as far I remember it compiles fine with PG8.4 so is it save to use it with PG8.4 ? Is it SAFE not "is it save"... ML -- Sent via pgsql-general mailing list (pgsql-genera

[GENERAL] using new Hstore in PG8.4

2010-02-04 Thread Marek Lewczuk
Hello, there are a lot of improvements in hstore, that is planned for PG8.5 - as far I remember it compiles fine with PG8.4 so is it save to use it with PG8.4 ? Thanks. ML -- Pozdrawiam Marek Lewczuk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

[GENERAL] serial columns with replication/cluster

2010-02-04 Thread Sean Hsien
Dear all, At work we're considering using postgres in a cluster. But I am wondering what implications does multi-master write replication have on auto-incrementing serial columns? E.g. Do we need to fiddle with the increment amount depending on the number of nodes we have? -- Thanks and regards,

[GENERAL] using new Hstore in PG8.4

2010-02-04 Thread Marek Lewczuk
Hello, there are a lot of improvements in hstore, that is planned for PG8.5 - as far I remember it compiles fine with PG8.4 so is it save to use it with PG8.4 ? Thanks. ML -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po