Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Chris Travers
On Tue, Sep 4, 2012 at 9:06 PM, Ondrej Ivanič ondrej.iva...@gmail.comwrote: Hi, On 5 September 2012 12:14, Chris Travers chris.trav...@gmail.com wrote: So people are using PostgreSQL in roles that aren't very visible anyway, DBA's are usually coming to PostgreSQL from other RDBMS's, and

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Albe Laurenz
John R Pierce wrote: was this a client process or a postgres process? kill -9 on postgres processes can easily trigger data corruption. It definitely shouldn't cause data corruption, otherwise PostgreSQL would not be crash safe. Yours, Laurenz Albe -- Sent via pgsql-general mailing list

Re: [GENERAL] Are there any options to parallelize queries?

2012-09-05 Thread Seref Arikan
Thanks Aleksey, Definitely worth noting. Impressive scalability according to slides. The use of Java is particularly interesting to me. Best regards Seref On Wed, Sep 5, 2012 at 6:27 AM, Aleksey Tsalolikhin atsaloli.t...@gmail.com wrote: Hi, Seref. You might want to take a look at Stado:

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Oliver Kohll - Mailing Lists
Here's a bit of positive news spin - in a backhanded way perhaps, but still a compliment: http://www.theregister.co.uk/2012/08/31/postgresql_too_cool_for_school/ Oliver www.agilebase.co.uk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Ivan Sergio Borgonovo
On Tue, 4 Sep 2012 19:14:28 -0700 Chris Travers chris.trav...@gmail.com wrote: So people are using PostgreSQL in roles that aren't very visible anyway, DBA's are usually coming to PostgreSQL from other RDBMS's, and few applications are really distributed for PostgreSQL. I know a bunch of

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Craig Ringer
On 09/05/2012 12:21 PM, John R Pierce wrote: was this a client process or a postgres process? kill -9 on postgres processes can easily trigger data corruption. It certainly shouldn't. kill -9 of the postmaster, deletion of postmaster.pid, and re-starting postgresql *might* but AFAIK even

Re: [GENERAL] Maintaining a materialized view only on a replica

2012-09-05 Thread Herouth Maoz
It's not an issue with the replication software. The reason the parts of the transaction are written out of order is that the original system that writes them in the first place makes no guarantees as to the order of writing. So basically my question is whether a trigger that runs a full

Re: [GENERAL] Error stopping postgresql service on a standby server.

2012-09-05 Thread Dipti Bharvirkar
Hi, Has anyone encountered this issue? Why would the WAL receiver process not stop when postmaster is shutdown? Any suggestions on how to avoid running into this error or ways to recover from it? Thank you in advance for any inputs on this, Dipti On Fri, Aug 31, 2012 at 1:17 PM, Dipti

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Achilleas Mantzios
On Τετ 05 Σεπτ 2012 10:51:49 Ivan Sergio Borgonovo wrote: On Tue, 4 Sep 2012 19:14:28 -0700 Chris Travers chris.trav...@gmail.com wrote: So people are using PostgreSQL in roles that aren't very visible anyway, DBA's are usually coming to PostgreSQL from other RDBMS's, and few

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Chris Angelico
On Wed, Sep 5, 2012 at 7:40 PM, Achilleas Mantzios ach...@smadev.internal.net wrote: (single master, 80+ slaves in 80+ vessels in the 7 seas (80+ = 80 and growning)) Cool!! How do your nodes communicate with each other? Is it an off-line resynchronization, or do you maintain long-range

[GENERAL] pgBadger 2.0 released

2012-09-05 Thread damien clochard
== pgBadger 2.0 released == ''Paris, France - September 5th, 2012'' DALIBO is proud to announce the release of version 2.0 of pgBadger, the new PostgreSQL log analyzer. pgBadger is built for speed with fully detailed reports from your PostgreSQL log file. It's a single and small Perl

[GENERAL] alter view, add/drop column

2012-09-05 Thread Gauthier, Dave
I googled around and found that adding/dropping columns from views is not available. (if not true, I'm all ears). Given that, what's the best way to do this? I was thinking along the lines of a stored procedure that reads the view's definition, modifies it, drops the view, recreates the view.

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Tom Lane
Craig Ringer ring...@ringerc.id.au writes: On 09/05/2012 12:21 PM, John R Pierce wrote: was this a client process or a postgres process? kill -9 on postgres processes can easily trigger data corruption. It certainly shouldn't. kill -9 of the postmaster, deletion of postmaster.pid, and

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Aleksey Tsalolikhin
On Wed, Sep 5, 2012 at 7:38 AM, Tom Lane t...@sss.pgh.pa.us wrote: Having said that, a kill -9 on an individual backend (*not* the postmaster) should be safe enough, if you don't mind the fact that it'll kill all your other sessions too. Got it, thanks. Why will it kill all your other

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Kevin Grittner
Aleksey Tsalolikhin atsaloli.t...@gmail.com wrote: Why will it kill all your other sessions too? Isn't there a separate backend process for each session? When stopped that abruptly, the process has no chance to clean up its pending state in shared memory. A fresh copy of shared memory is

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Aleksey Tsalolikhin atsaloli.t...@gmail.com wrote: Why will it kill all your other sessions too? Isn't there a separate backend process for each session? When stopped that abruptly, the process has no chance to clean up its pending state

Re: [GENERAL] alter view, add/drop column

2012-09-05 Thread Johan Nel
Dave, On Wednesday, 5 September 2012 16:16:32 UTC+2, Gauthier, Dave wrote: I googled around and found that adding/dropping columns from views is not available. (if not true, I'm all ears). Given that, what's the best way to do this?  I was thinking along the lines of a stored procedure that

[GENERAL] Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
I have searched and searched and just cannot find the maximum lengths for input variables in a function i.e. CREATE FUNCTION test(input1 char(5), input2 varchar(50)) RETURNS void AS $$RAISE NOTICE('%,%'), $1, $2;$$ LANGUAGE plpgsql; Where do I find the 5 and the 50 it has to be somewhere I

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Achilleas Mantzios
On Τετ 05 Σεπτ 2012 23:44:08 Chris Angelico wrote: On Wed, Sep 5, 2012 at 7:40 PM, Achilleas Mantzios ach...@smadev.internal.net wrote: (single master, 80+ slaves in 80+ vessels in the 7 seas (80+ = 80 and growning)) Cool!! How do your nodes communicate with each other? Is it an

Re: [GENERAL] Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread Pavan Deolasee
On Wed, Sep 5, 2012 at 9:10 PM, jam3 jamort...@gmail.com wrote: I have searched and searched and just cannot find the maximum lengths for input variables in a function i.e. CREATE FUNCTION test(input1 char(5), input2 varchar(50)) RETURNS void AS $$RAISE NOTICE('%,%'), $1, $2;$$ LANGUAGE

Re: [GENERAL] Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread Pavel Stehule
2012/9/5 Pavan Deolasee pavan.deola...@gmail.com: On Wed, Sep 5, 2012 at 9:10 PM, jam3 jamort...@gmail.com wrote: I have searched and searched and just cannot find the maximum lengths for input variables in a function i.e. CREATE FUNCTION test(input1 char(5), input2 varchar(50)) RETURNS

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Aleksey Tsalolikhin
Got it, thanks, Kevin, Tom. So how about that this process that was in notify interrupt waiting waiting status after I SIGTERM'ed it. Is the double waiting expected? Aleksey -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread Tom Lane
jam3 jamort...@gmail.com writes: I have searched and searched and just cannot find the maximum lengths for input variables in a function CREATE FUNCTION test(input1 char(5), input2 varchar(50)) RETURNS void AS $$RAISE NOTICE('%,%'), $1, $2;$$ LANGUAGE plpgsql; Where do I find the 5 and

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Tom Lane
Aleksey Tsalolikhin atsaloli.t...@gmail.com writes: So how about that this process that was in notify interrupt waiting waiting status after I SIGTERM'ed it. Is the double waiting expected? That sounded a bit fishy to me too. But unless you can reproduce it in something newer than 8.4.x,

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
Yeah thats what I was starting to wonder if those lengths basically mean nothing. I am writing a ton of functions to unit test all of the functions in our app and am generating random strings and would like to pass the lengths to my random string generator so if it's varchar 50 I am generating a

[GENERAL] values from txid_current()

2012-09-05 Thread Sahagian, David
Using 9.1.3 Start Transaction; DO $$ BEGIN raise info '%', txid_current(); END $$; ALTER TABLE MyCoolTable_1 DISABLE TRIGGER trg_foo_1 ; Commit; Start Transaction; ALTER TABLE MyCoolTable_2 DISABLE TRIGGER trg_foo_2 ; Commit; Start

Re: [GENERAL] values from txid_current()

2012-09-05 Thread Pavan Deolasee
On Wed, Sep 5, 2012 at 10:53 PM, Sahagian, David david.sahag...@emc.comwrote: Why are the Messages displayed by my pgAdmin sql window like this . . . INFO: 7902 INFO: 7903 INFO: 7904 instead of what I expected . . . INFO: 7902 INFO: 7904 INFO: 7906 ??? Are you sure those ALTER

Re: [GENERAL] values from txid_current()

2012-09-05 Thread Sahagian, David
OK, now I will answer my own question. It seems that ALTER TABLE MyCoolTable_1 DISABLE TRIGGER trg_foo_1 ; is a no-op when it is currently disabled. And so no txn id is needed. When I alternate DISable and ENable statements, it behaves as I expect . . . Start Transaction; DO $$ BEGIN raise

[GENERAL] Moving several databases into one database with several schemas

2012-09-05 Thread Edson Richter
Dear list, _*Scenario:*_ I'm using PostgreSQL 9.1 on Linux x64 running over CentOS 5. Everything is fine, but now I do have 4 separate databases running on different servers, and every server has some shared tables. I've been working on a complex logic that is able to replicate these

Re: [GENERAL] postgres process got stuck in notify interrupt waiting status

2012-09-05 Thread Aleksey Tsalolikhin
On Wed, Sep 5, 2012 at 10:03 AM, Tom Lane t...@sss.pgh.pa.us wrote: That sounded a bit fishy to me too. But unless you can reproduce it in something newer than 8.4.x, nobody's likely to take much of an interest. The LISTEN/NOTIFY infrastructure got completely rewritten in 9.0, so any bugs in

[GENERAL] max_connections

2012-09-05 Thread Modumudi, Sireesha
Hi all, I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100, but I want to know if this can be increased, if so, what should we take into consideration? Thank you, Sireesha

Re: [GENERAL] max_connections

2012-09-05 Thread Scott Marlowe
On Wed, Sep 5, 2012 at 2:30 PM, Modumudi, Sireesha sireesha.modum...@emc.com wrote: Hi all, I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100, but I want to know if this can be increased, if so, what should we take into consideration? If you're considering raising

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-05 Thread jam3
Here is a bash script I wrote to print out mem config ffrom postgresconf.sql and os (centos 5.5 in this case). According to Gregory Smith in Postgresql 9.0 shared buffers should be appx 25-40% of avail Physical RAM. Also considerPostgres uses the OS Buffer as it access the physical data and log

[GENERAL] When does Postgres cache query plans?

2012-09-05 Thread Mike Christensen
I'm curious under what circumstances Postgres will cache an execution plan for a query. Obviously if you create it with the PREPARE statement, it will be cached.. However, if I just run an ad-hoc query such as: select * from Foo where X 5; A few hundred times, will that be cached? What if I

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread Kevin Grittner
jam3 jamort...@gmail.com wrote: create or replace function test1(c1 char(10), c2 varchar(20)) Just showing that it does indeed not use the length in at all Correct. That is functioning as intended and is not likely to change any time soon. You might consider using domains: drop

Re: [GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of jam3 Sent: Wednesday, September 05, 2012 3:34 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Re: Where is the char and varchar length in pg_catalog for

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
Duh never mind I call brain cloud on that one, and thanks for all the help. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Where-is-the-char-and-varchar-length-in-pg-catalog-for-function-input-variables-tp5722845p5722880.html Sent from the PostgreSQL - general mailing

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
This is what I meant to post drop table test_table; create table test_table ( column1 char(20), column2 varchar(40) ) without oids; drop function test1(char(10), varchar(20)); create or replace function test1(c1 char(10), c2 varchar(20)) returns void as $$ BEGIN insert into

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-05 Thread Scott Marlowe
On Wed, Sep 5, 2012 at 2:16 PM, jam3 jamort...@gmail.com wrote: Here is a bash script I wrote to print out mem config ffrom postgresconf.sql and os (centos 5.5 in this case). According to Gregory Smith in Postgresql 9.0 shared buffers should be appx 25-40% of avail Physical RAM. Also

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
How does postgres figure this out to throw the error msg? create table test_table ( column1 char(10), column2 varchar(20) ) without oids; create or replace function test1(c1 char(10), c2 varchar(20)) returns void as $$ BEGIN insert into test_table values ($1, $2); END $$

Re: [GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread David Johnston
How does postgres figure this out to throw the error msg? select test1('this is way way longer than 10 characters','this is way way way way way way way way way way way way longer than 20 characters') ERROR: value too long for type character(10) CONTEXT: SQL statement insert into

Re: [GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread Kevin Grittner
David Johnston pol...@yahoo.com wrote: If you want to guarantee that the INSERT will work you would need to write: INSERT INTO test_table VALUES ( $1::char(10), $2::varchar(20) ) Note that this will quietly cut off the tail end of the supplied data, so it should only be used when that is

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread jam3
MySQL doesn't even support self referential updates like update t1 set c1 ='value' where t1.id not in (select id from t1 where id 100); Nor is it fully ACID compliant. And its online documentation is a nightmare. PgAdmin is infintely better than mysql workbench, heck anything is better than

Re: [GENERAL] max_connections

2012-09-05 Thread Kevin Grittner
Modumudi, Sireesha sireesha.modum...@emc.com wrote: I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100, but I want to know if this can be increased, if so, what should we take into consideration? http://wiki.postgresql.org/wiki/Number_Of_Database_Connections

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Magnus Hagander
On Sat, Sep 1, 2012 at 1:24 PM, Peter Bex peter@xs4all.nl wrote: On Sat, Sep 01, 2012 at 12:43:15AM +0200, Geert Mak wrote: There is this case studies section as well - http://www.postgresql.org/about/casestudies/ Which appear to me a little old and a little too little, one could try to

Re: [GENERAL] Moving several databases into one database with several schemas

2012-09-05 Thread Edson Richter
Em 05/09/2012 15:30, Edson Richter escreveu: Dear list, _*Scenario:*_ I'm using PostgreSQL 9.1 on Linux x64 running over CentOS 5. Everything is fine, but now I do have 4 separate databases running on different servers, and every server has some shared tables. I've been working on a

Re: [GENERAL] When does Postgres cache query plans?

2012-09-05 Thread Tom Lane
Mike Christensen m...@kitchenpc.com writes: I'm curious under what circumstances Postgres will cache an execution plan for a query. If you're writing raw SQL, never. The assumption is that the application knows its usage pattern a lot better than the server does, and if the application is

Re: [GENERAL] When does Postgres cache query plans?

2012-09-05 Thread Mike Christensen
On Wed, Sep 5, 2012 at 3:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Mike Christensen m...@kitchenpc.com writes: I'm curious under what circumstances Postgres will cache an execution plan for a query. If you're writing raw SQL, never. The assumption is that the application knows its usage

Re: [GENERAL] regexp_matches question

2012-09-05 Thread Sergio Basurto
On Tue, 2012-09-04 at 21:58 -0400, David Johnston wrote: On Sep 4, 2012, at 21:39, Sergio Basurto sbasu...@soft-gator.com wrote: I am using regexp_matches in a function like this create or replace function test (v_string in text) returns varchar as $$ declare i_strings

Re: [GENERAL] regexp_matches question

2012-09-05 Thread David Johnston
On Sep 5, 2012, at 19:02, Sergio Basurto sbasu...@soft-gator.com wrote: On Tue, 2012-09-04 at 21:58 -0400, David Johnston wrote: On Sep 4, 2012, at 21:39, Sergio Basurto sbasu...@soft-gator.com wrote: I am using regexp_matches in a function like this create or replace function test

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread David Boreham
I dunno, perhaps I don't get out the office enough, but I just don't hear about MySQL any more. I think this thread is tilting at windmills. A few years ago about 1 in 2 contracts we had was with a start-up using MySQL. The other half were using either PG or Oracle or SQLServer. The years

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Chris Travers
On Wed, Sep 5, 2012 at 2:40 AM, Achilleas Mantzios ach...@smadev.internal.net wrote: On Τετ 05 Σεπτ 2012 10:51:49 Ivan Sergio Borgonovo wrote: On Tue, 4 Sep 2012 19:14:28 -0700 Chris Travers chris.trav...@gmail.com wrote: So people are using PostgreSQL in roles that aren't very

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Chris Travers
Regarding MySQL vs PostgreSQL: MySQL is what you get when app developers build a database server. PostgreSQL is what you get when db developers build a development platform. There really isn't anything more to say about it. Best Wishes, Chris Travers

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Damian Carey
On Sat, Sep 1, 2012 at 5:25 AM, Andy Yoder ayo...@airfacts.com wrote: Hello all, I would like the community's input on a topic. The words too far out of the mainstream are from an e-mail we received from one of our clients, describing the concern our client's IT group has about our use of

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Edson Richter
Em 05/09/2012 23:49, Chris Travers escreveu: Regarding MySQL vs PostgreSQL: MySQL is what you get when app developers build a database server. PostgreSQL is what you get when db developers build a development platform. There really isn't anything more to say about it. This kind of claim is

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Scott Marlowe
On Wed, Sep 5, 2012 at 8:56 PM, Edson Richter edsonrich...@hotmail.com wrote: Em 05/09/2012 23:49, Chris Travers escreveu: Regarding MySQL vs PostgreSQL: MySQL is what you get when app developers build a database server. PostgreSQL is what you get when db developers build a development

Re: [GENERAL] max_connections

2012-09-05 Thread jam3
According to http://www.postgresql.org/docs/8.3/static/kernel-resources.html The maximum shared memory usage of a connection in bytes is 1800 + 270 * max_locks_per_transaction max_locks_per_transaction default is 64 19080 Bytes or .018 mb's per connection or 1.819 mb at 100 default

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Edson Richter
Em 06/09/2012 00:39, Scott Marlowe escreveu: On Wed, Sep 5, 2012 at 8:56 PM, Edson Richter edsonrich...@hotmail.com wrote: Em 05/09/2012 23:49, Chris Travers escreveu: Regarding MySQL vs PostgreSQL: MySQL is what you get when app developers build a database server. PostgreSQL is what you get

Re: [GENERAL] Too far out of the mainstream

2012-09-05 Thread Chris Travers
On Wed, Sep 5, 2012 at 7:56 PM, Edson Richter edsonrich...@hotmail.comwrote: Em 05/09/2012 23:49, Chris Travers escreveu: Regarding MySQL vs PostgreSQL: MySQL is what you get when app developers build a database server. PostgreSQL is what you get when db developers build a development