Re: [ADMIN] PL/pgSQL memory consumption?

2008-02-24 Thread Dawid Kuroczko
On Fri, Feb 22, 2008 at 3:54 PM, Tom Lane <[EMAIL PROTECTED]> wrot> "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > > I have recently found a nice utility called memstat (which shows how > > much of private > > (not shared)) memory each process uses. What kind of surprised me was > > the amount

Re: [ADMIN] PL/pgSQL memory consumption?

2008-02-23 Thread Tom Lane
"Peter Koczan" <[EMAIL PROTECTED]> writes: > Correct me if I'm wrong, as well, but I believe that Linux (and > probably other modern Unices) does code-sharing, meaning that separate > processes referring to the same code/libraries will refer to the same > copy in physical memory. > So, even though

Re: [ADMIN] PL/pgSQL memory consumption?

2008-02-23 Thread Peter Koczan
On Fri, Feb 22, 2008 at 8:54 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > > I have recently found a nice utility called memstat (which shows how > > much of private > > (not shared)) memory each process uses. What kind of surprised me was > > the amo

Re: [ADMIN] PL/pgSQL memory consumption?

2008-02-22 Thread Tom Lane
"Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > I have recently found a nice utility called memstat (which shows how > much of private > (not shared)) memory each process uses. What kind of surprised me was > the amount > of memory that is used by PL/pgSQL (one more reason not to provide it > by de

[ADMIN] PL/pgSQL memory consumption?

2008-02-22 Thread Dawid Kuroczko
Hi there, I have recently found a nice utility called memstat (which shows how much of private (not shared)) memory each process uses. What kind of surprised me was the amount of memory that is used by PL/pgSQL (one more reason not to provide it by default? ;-)). For example: # sysctl -w|grep pl

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-05-03 Thread Tom Lane
Jeff Frost <[EMAIL PROTECTED]> writes: > Got my oprofile man page reading done. Here's the general opreport: > ... > And the postgres one: > samples %symbol name > 3894022 12.6488 LWLockAcquire > 3535497 11.4842 slot_deform_tuple > 3030280 9.8431 LWLockRelease > 2279699 7.4050 H

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-05-03 Thread Jeff Frost
On Tue, 24 Apr 2007, Tom Lane wrote: Jeff Frost <[EMAIL PROTECTED]> writes: Well, finally got this system upgraded to 8.1.8, but unfortunately, that did not resolve this. Is there any reasonable way to see where this function is spending it's time? I've grown enamored of oprofile lately ---

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-04-23 Thread Tom Lane
Jeff Frost <[EMAIL PROTECTED]> writes: > Well, finally got this system upgraded to 8.1.8, but unfortunately, that did > not resolve this. Is there any reasonable way to see where this function is > spending it's time? I've grown enamored of oprofile lately --- if you're on a recent Linux system

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-04-23 Thread Jeff Frost
On Fri, 16 Mar 2007, Jeff Frost wrote: On Fri, 16 Mar 2007, Jeff Frost wrote: On Fri, 16 Mar 2007, Tom Lane wrote: Jeff Frost <[EMAIL PROTECTED]> writes: ... Interestingly, when you strace the backend, it doesn't appear to be doing too much...here's some sample output: select(0, NULL, NU

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Jeff Frost
On Fri, 16 Mar 2007, Jeff Frost wrote: On Fri, 16 Mar 2007, Tom Lane wrote: Jeff Frost <[EMAIL PROTECTED]> writes: ... Interestingly, when you strace the backend, it doesn't appear to be doing too much...here's some sample output: select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Jeff Frost
On Fri, 16 Mar 2007, Tom Lane wrote: Jeff Frost <[EMAIL PROTECTED]> writes: ... Interestingly, when you strace the backend, it doesn't appear to be doing too much...here's some sample output: select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(3932217, 0x7fbfffd150, 1) = 0 se

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Tom Lane
Jeff Frost <[EMAIL PROTECTED]> writes: > ... Interestingly, when you > strace the backend, it doesn't appear to be doing too much...here's some > sample output: > select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) > semop(3932217, 0x7fbfffd150, 1) = 0 > semop(3932217, 0x7fbfffd150, 1)

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Jeff Frost
Everything else except the one postmaster process hum along just fine. I.e. nothing else appears to take much system resources at all. Autovac is set with the 8.2.x default settings. Oh, and the data was ANALYZE'd after it got moved to the new server. Here's the code in case we have something

Re: [ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Shoaib Mir
Are the stat collector and autovacuum processes in good shape? -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/16/07, Jeff Frost <[EMAIL PROTECTED]> wrote: I've got a client that has a function in a db which had been humming along quite nicely on 2xOpteron 275, PG 8.1.5, 8GB of RAM. No

[ADMIN] pl/pgsql function spikes CPU 100%

2007-03-16 Thread Jeff Frost
I've got a client that has a function in a db which had been humming along quite nicely on 2xOpteron 275, PG 8.1.5, 8GB of RAM. Now suddenly many of the functions in the DB if called will spike the CPU to 100%. These are functions that used to finish in 7ms, now run for 20-40 mins. Interestin

Re: [ADMIN] PL/pgSQL Return statements

2007-01-15 Thread Tom Lane
"Donald Fraser" <[EMAIL PROTECTED]> writes: > I'm getting errors like the following: > ERROR: RETURN cannot have a parameter in function returning void at or = > near "VOID" at character 2983. > Does this mean I must edit every function that is declared with RETURNS = > VOID and remove the RETUR

[ADMIN] PL/pgSQL Return statements

2007-01-15 Thread Donald Fraser
Hello, I am currently trying to upgrade PostgreSQL from 8.0 to 8.1 on our development machine and have run into a problem with RETURN VOID; statements in PL/pgSQL functions that have a return type of void. I'm getting errors like the following: ERROR: RETURN cannot have a parameter in function

Re: [ADMIN] PL/pgsql

2004-07-01 Thread Bender, Cheryl
om: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tuttle, Gene Sent: Tuesday, June 29, 2004 3:53 PM To: '[EMAIL PROTECTED]' Subject: [ADMIN] PL/pgsql I am new to Postgresql and am having problems getting functions working. I have been following an example in the book "Postgre

[ADMIN] PL/pgsql

2004-07-01 Thread Tuttle, Gene
I am new to Postgresql and am having problems getting functions working. I have been following an example in the book "PostgreSQL" by Douglas & Douglas Published by Developers Library. I put the code in as a function (see end of email) When I execute it from psql I get the following: dev=# sele

Re: [ADMIN] PL/pgSQL

2004-06-30 Thread Tom Lane
"Tuttle, Gene" <[EMAIL PROTECTED]> writes: > I am not able to run any user created functions. > [ plpgsql dumps core ] My bet would be that you have a plpgsql.so library that is mismatched with your postgres server. It's fairly easy to get into such situations if you've upgraded your PG version

[ADMIN] PL/pgSQL

2004-06-30 Thread Tuttle, Gene
I am not able to run any user created functions. Thanks for your help. Gene Tuttle. Postgres 7.4 Redhat 9 Debug output: DEBUG: StartTransactionCommand LOG: statement: select my_factorial(1); DEBUG: parse tree: DETAIL: {QUERY :commandType 1 :querySource 0 :canSetTag true :utilityStmt <>

[ADMIN] PL/pgSQL instalLation problem ??

2004-06-05 Thread GP
Hi All, I am trying to run the tutorial examples concerning the "Implementation of views in PostgreSQL" but I have some problems with the PL/pgSQL language installation.. The corresponding library is located in /usr/local/pgsql/lib/plpgsql.so and I set the PGLIB enviroment variable to /usr/local

Re: [ADMIN] PL/pgSQL instalLation problem ??

2004-02-21 Thread Robert Treat
On Wednesday 18 February 2004 10:21, GP wrote: > Hi All, > > I am trying to run the tutorial examples concerning the "Implementation > of views in PostgreSQL" but I have some problems with the > PL/pgSQL language installation.. > > The corresponding library is located in /usr/local/pgsql/lib/plpgsq

[ADMIN] PL/pgsql -> C

2002-03-26 Thread Richard Emberson
Premise: There exists a mapping of any legal PL/pgsql procedure into the equivilent C code. Question: Has anyone every written a PL/pgsql-2-C transformer? Issues: One would really like to map the optimized PL/pgsql into C, not just the unoptimized, as coded, PL/pgsql. Optimization depends upon

[ADMIN] Pl/PGSQL error

2002-02-26 Thread Felipe Carasso
Greetings, I have been developping a small DB system mixing libpq and PL/PGSQL. Recently I tried to extract the system from a Postgres 7.1/RedHat 6.2 tar file to a Postgres 7.1/RedHat 7.2 and a few errors regarding the PL/PGSQL instalation have been happening. The first one was fixed by r

Re: [ADMIN] PL/pgSQL location in RH7.2?

2002-02-20 Thread Tom Lane
Rasmus Mohr <[EMAIL PROTECTED]> writes: > Does anyone know in which directory PL/pgSQL is located in Red Hat 7.2? [tgl@rh1 tgl]$ rpm -ql `rpm -qa | grep postgres` | grep plpgsql /usr/share/doc/postgresql-7.1.3/html/plpgsql-description.html /usr/share/doc/postgresql-7.1.3/html/plpgsql-examples.htm

[ADMIN] PL/pgSQL location in RH7.2?

2002-02-20 Thread Rasmus Mohr
Does anyone know in which directory PL/pgSQL is located in Red Hat 7.2? I supposed to add this language to an existing postgreSQL installation using 'createlang' but so far I've been unable to located the pgsql/bin directory :-( -- Rasm

Re: [ADMIN] PL/pgSQL

2001-03-02 Thread Stephan Szabo
You need to run createlang to install the procedural languages (createlang ). On Fri, 2 Mar 2001, Oliver Vecernik wrote: > Hi, > > I recently started using postgresql. I'm running version 7.0.3 on a SuSE > 7.1 Linux box. I'm trying to test the examples in the user's guide. But > I can not cre

[ADMIN] PL/pgSQL

2001-03-02 Thread Oliver Vecernik
Hi, I recently started using postgresql. I'm running version 7.0.3 on a SuSE 7.1 Linux box. I'm trying to test the examples in the user's guide. But I can not create a function with language 'plpgsql'. It seems there has some installation be done to achieve that. But how? Can anybody point me to