Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread tuanhoanganh
On Thu, Jan 3, 2013 at 11:52 AM, Craig Ringer wrote: > What's your host Windows OS? Windows Server 2008 R2? Windows 7? > I am runing Windows Server 2008 R2

Re: [GENERAL] un-pivot with crosstab?

2013-01-02 Thread David Johnston
Kirk Wythers wrote > I am trying to follow the example given below, but in reverse. I have > something like table2, that I am trying to "un-pivot" to look like table1… > And I seem to be having a booger of a time. I see nothing in the tablefunc/crosstab documentation to suggest this can be done.

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread Craig Ringer
On 01/03/2013 12:16 PM, tuanhoanganh wrote: > On Thu, Jan 3, 2013 at 10:45 AM, Craig Ringer > wrote: > > Running PostgreSQL directly via pg_ctl, not as a service, will not > change how it performs under load at all. It will not help you service > more than

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread tuanhoanganh
On Thu, Jan 3, 2013 at 11:04 AM, John R Pierce wrote: > of course, a pooler only works right if the client applications are > modified to open a connection, do a transaction, and close the connection. > if the clients continue to hold idle connections, the pooler won't do > anything useful for y

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread tuanhoanganh
On Thu, Jan 3, 2013 at 10:45 AM, Craig Ringer wrote: > Running PostgreSQL directly via pg_ctl, not as a service, will not > change how it performs under load at all. It will not help you service > more than 500 concurrent connections. > > You really need to put a connection pool in place to limit

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread John R Pierce
On 1/2/2013 7:45 PM, Craig Ringer wrote: You really need to put a connection pool in place to limit the number of concurrent workers. Look at PgBouncer or PgPool-II. As far as I know neither of them runs on Windows; you might want to think about a Linux box as a front-end. 2nd and 3rd the emoti

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread Craig Ringer
On 01/03/2013 10:40 AM, tuanhoanganh wrote: > Hello all. > I have more than 500 users connect to Postgres in windows 2008 R2. I > change registry make postgres service support 512 connect. But is > there any good way make postgres run as process not service. Is it > safe run postgres as process in

Re: [GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread John R Pierce
On 1/2/2013 6:40 PM, tuanhoanganh wrote: I have more than 500 users connect to Postgres in windows 2008 R2. I change registry make postgres service support 512 connect. But is there any good way make postgres run as process not service. Is it safe run postgres as process in windows. a service

[GENERAL] PostgreSQL run as process in windows

2013-01-02 Thread tuanhoanganh
Hello all. I have more than 500 users connect to Postgres in windows 2008 R2. I change registry make postgres service support 512 connect. But is there any good way make postgres run as process not service. Is it safe run postgres as process in windows. Thank you very much (sorry for my English)

Re: [GENERAL] Query fluctuates .... Strange strange .....

2013-01-02 Thread Adrian Klaver
On 01/02/2013 11:08 AM, Abraham, Danny wrote: PG 8.3.7 on HP 11.31. Very strong Server with lots of memory. A query runs that inserts 40K records takes 1 second when run from psql. It takes 20 minutes!! And 100% CPU !! when called from a standalone JDBC program. No other users are running !!

Re: [GENERAL] Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail?

2013-01-02 Thread Peter Geoghegan
On 2 January 2013 16:55, AI Rumman wrote: > Is there any plugin for Nagios, which sends Postgresql ERROR information > with SQL query in mail? It has nothing to do with Nagious, but tail_n_mail may do what you want here. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Developmen

Re: [GENERAL] Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail?

2013-01-02 Thread Steve Crawford
On 01/02/2013 08:55 AM, AI Rumman wrote: Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail? I can't comment on Nagios, but I do the same basic thing by routing PostgreSQL logging through syslog which is configured to copy significant errors into a

[GENERAL] Query fluctuates .... Strange strange .....

2013-01-02 Thread Abraham, Danny
PG 8.3.7 on HP 11.31. Very strong Server with lots of memory. A query runs that inserts 40K records takes 1 second when run from psql. It takes 20 minutes!! And 100% CPU !! when called from a standalone JDBC program. No other users are running !!! The problematic query: 2013-01-02 15:00:3

[GENERAL] un-pivot with crosstab?

2013-01-02 Thread Kirk Wythers
I am trying to follow the example given below, but in reverse. I have something like table2, that I am trying to "un-pivot" to look like table1… And I seem to be having a booger of a time. My attempt: SELECT * FROM crosstab( 'SELECT rowid, key1,key1 FROM test WHERE key1= ''val

Fwd: [GENERAL] Question on Trigram GIST indexes

2013-01-02 Thread ERR ORR
(forwarded to pgsql-general after it went to Kevin Grittner alone) On 22 December 2012 22:46, Kevin Grittner wrote: > ERR ORR wrote: > > > Specifically, I was trying to replicate what is done in this blog post: > > > http://www.postgresonline.com/journal/archives/212-PostgreSQL-9.1-Trigrams-teac

[GENERAL] Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail?

2013-01-02 Thread AI Rumman
Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail?

Re: [GENERAL] Dedicated PostgreSQL System

2013-01-02 Thread Andrew Hastie
On 02/01/13 14:30, Carlos Mennens wrote: Hello All, I'm trying to understand what exact parameters or configurations are adjusted when a PostgreSQL database system is going to be used as a 'stand-alone' or 'dedicated' server versus a shared or embedded database system? I have a server that's onl

[GENERAL] Dedicated PostgreSQL System

2013-01-02 Thread Carlos Mennens
Hello All, I'm trying to understand what exact parameters or configurations are adjusted when a PostgreSQL database system is going to be used as a 'stand-alone' or 'dedicated' server versus a shared or embedded database system? I have a server that's only going to be dedicated to running Linux an

Re: [GENERAL] Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function

2013-01-02 Thread Ali Pouya
2013/1/2 Pavel Stehule > you forgot USING clause > > BEGIN > EXECUTE 'INSERT INTO measurement1 values(new.*)' USING new; > --INSERT INTO measurement1 values(new.*); > RETURN NULL; > END; > > Regards > > Pavel Stehule > Hi Pavel, Thanks for your answer, but it did not wor

Re: [GENERAL] Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function

2013-01-02 Thread Pavel Stehule
Hello 2013/1/2 Ali Pouya : > Hi all, > > The SQL file joined here reproduces the simplified version of a problem that > I encounter when trying to use the "NEW" record in an EXECUTE command within > a PL/PgSql trigger function. > > In this script the commented INSERT command works fine but the E

[GENERAL] Using the NEW record in an EXECUTE command in a PL/pgSQL trigger function

2013-01-02 Thread Ali Pouya
Hi all, The SQL file joined here reproduces the simplified version of a problem that I encounter when trying to use the "NEW" record in an EXECUTE command within a PL/PgSql trigger function. In this script the commented INSERT command works fine but the EXECUTE commande returns the following erro