Re: [GENERAL] debugging SSL connection problems

2017-07-11 Thread Michael Paquier
On Tue, Jul 11, 2017 at 6:32 AM, Magnus Hagander wrote: > On Mon, Jul 10, 2017 at 11:19 PM, Jeff Janes wrote: >> Is there a way to get libpq to hand over the certificate it gets from the >> server, so I can inspect it with other tools that give better diagnostic >> messages? I've tried to scrape

Re: [GENERAL] debugging SSL connection problems

2017-07-10 Thread Magnus Hagander
On Mon, Jul 10, 2017 at 11:19 PM, Jeff Janes wrote: > > Is there a way to get libpq to hand over the certificate it gets from the > server, so I can inspect it with other tools that give better diagnostic > messages? I've tried to scrape it out of the output of "strace -s8192", > but since it is

[GENERAL] debugging SSL connection problems

2017-07-10 Thread Jeff Janes
Is there a way to get libpq to hand over the certificate it gets from the server, so I can inspect it with other tools that give better diagnostic messages? I've tried to scrape it out of the output of "strace -s8192", but since it is binary it is difficult to figure out where it begins and ends w

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-20 Thread k...@rice.edu
On Thu, May 19, 2016 at 05:52:26PM -0400, Tom Lane wrote: > "k...@rice.edu" writes: > > The stack trace just appeared to be what I would expect while a 'DISCARD > > ALL' > > command was being run: > > > #0 0x0073bc7c in MemoryContextSetParent () > > #1 0x0073bde3 in MemoryConte

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Tom Lane
"k...@rice.edu" writes: > The stack trace just appeared to be what I would expect while a 'DISCARD ALL' > command was being run: > #0 0x0073bc7c in MemoryContextSetParent () > #1 0x0073bde3 in MemoryContextDelete () > #2 0x0054e3a9 in DropAllPreparedStatements () > #3

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
On Thu, May 19, 2016 at 09:58:45AM -0400, Tom Lane wrote: > "k...@rice.edu" writes: > > I am investigating a problem with a backend that appears to be stuck > > and spinning while performing a "DISCARD ALL" command. The system is > > running an older release 9.2.2. > > You do realize that the cur

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Merlin Moncure
On Thu, May 19, 2016 at 8:46 AM, k...@rice.edu wrote: > Hi PostgreSQL community, > > I am investigating a problem with a backend that appears to be stuck > and spinning while performing a "DISCARD ALL" command. The system is > running an older release 9.2.2. Are there any bugs that could be > caus

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
On Thu, May 19, 2016 at 09:58:45AM -0400, Tom Lane wrote: > "k...@rice.edu" writes: > > I am investigating a problem with a backend that appears to be stuck > > and spinning while performing a "DISCARD ALL" command. The system is > > running an older release 9.2.2. > > You do realize that the cur

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Adrian Klaver
On 05/19/2016 06:46 AM, k...@rice.edu wrote: Hi PostgreSQL community, I am investigating a problem with a backend that appears to be stuck and spinning while performing a "DISCARD ALL" command. The system is running an older release 9.2.2. Are there any bugs that could be causing this behavior?

Re: [GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread Tom Lane
"k...@rice.edu" writes: > I am investigating a problem with a backend that appears to be stuck > and spinning while performing a "DISCARD ALL" command. The system is > running an older release 9.2.2. You do realize that the current release in that series is 9.2.17. > Are there any bugs that coul

[GENERAL] Debugging a backend stuck consuming CPU

2016-05-19 Thread k...@rice.edu
Hi PostgreSQL community, I am investigating a problem with a backend that appears to be stuck and spinning while performing a "DISCARD ALL" command. The system is running an older release 9.2.2. Are there any bugs that could be causing this behavior? How can I tell what the process is actually doi

Re: [GENERAL] Debugging code on server?

2016-05-04 Thread Szymon Lipiński
On 4 May 2016 at 20:30, Thomas Kellerer wrote: > Guyren Howe schrieb am 04.05.2016 um 18:43: > >> This is a fork from my "Love your database" question. It's a >> separable concern, so I moved it here. >> >> Let's say I want to use Postgres' *amazing* support for lots of >> languages. I want to us

Re: [GENERAL] Debugging code on server?

2016-05-04 Thread Thomas Kellerer
Guyren Howe schrieb am 04.05.2016 um 18:43: This is a fork from my "Love your database" question. It's a separable concern, so I moved it here. Let's say I want to use Postgres' *amazing* support for lots of languages. I want to use Javascript or PERL or Ruby or something. How do I debug the cod

Re: [GENERAL] Debugging code on server?

2016-05-04 Thread Vick Khera
Good old fashioned "print" :) I tend to use RAISE DEBUG, and look in the logs. The most complicated procedures we have in our system are enforcing state diagram changes for a given field that tracks an object status, so maybe this doesn't scale well. On Wed, May 4, 2016 at 12:43 PM, Guyren Howe

[GENERAL] Debugging code on server?

2016-05-04 Thread Guyren Howe
This is a fork from my "Love your database" question. It's a separable concern, so I moved it here. Let's say I want to use Postgres' *amazing* support for lots of languages. I want to use Javascript or PERL or Ruby or something. How do I debug the code? I can imagine things you might set up: u

Re: [GENERAL] debugging server connection issue

2016-03-31 Thread Stephen Constable
In case anybody looks back on this thread in the future, I fixed the problem (at least temporarily) by running the following in CentOS 7: # echo "1025 65535" >/proc/sys/net/ipv4/ip_local_port_range # sysctl -w net.ipv4.tcp_timestamps=1 # sysctl -w net.ipv4.tcp_tw_recycle=1 # sysctl -w tcp_tw_reuse=

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread Adrian Klaver
On 03/29/2016 03:25 PM, Stephen Constable wrote: Sorry, my client environment is Linux. Hmm, so I was reading win32.c wrong. It is mapping a Windows error message to that string. My current theory is that my clients are running out of available ephemeral ports, like in this thread: http://

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread John R Pierce
On 3/29/2016 3:25 PM, Stephen Constable wrote: Sorry, my client environment is Linux. My current theory is that my clients are running out of available ephemeral ports, like in this thread: http://dba.stackexchange.com/questions/59650/pgbouncer-works-great-but-occasionally-becomes-unavailable

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread Stephen Constable
Sorry, my client environment is Linux. My current theory is that my clients are running out of available ephemeral ports, like in this thread: http://dba.stackexchange.com/questions/59650/pgbouncer-works-great-but-occasionally-becomes-unavailable (but I"m not currently using pg bouncer). I tried

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread Adrian Klaver
On 03/29/2016 01:28 PM, Stephen Constable wrote: My apologies, I'm not sure what part of the networking stack the messages are coming from. It also states: """ could not connect to server: Cannot assign requested address Is the server running on host "" and accepting TCP/IP connections on port ?

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread John R Pierce
On 3/29/2016 1:28 PM, Stephen Constable wrote: """ This error is only printed under a 32-job load, never a single job load. The processes are indeed connecting over a local network. I have only enabled the logging of connections and disconnections since I figured that would be the most telling

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread Stephen Constable
My apologies, I'm not sure what part of the networking stack the messages are coming from. It also states: """ could not connect to server: Cannot assign requested address Is the server running on host "" and accepting TCP/IP connections on port ? """ This error is only printed under a 32-job load

Re: [GENERAL] debugging server connection issue

2016-03-29 Thread Adrian Klaver
On 03/29/2016 01:10 PM, Stephen Constable wrote: Hi All, I'm a new-ish sysadmin working on porting legacy scientific code from a local server/client to new supercomputer environment. My work is mostly done, except that my postgres database doesn't seem to be able to keep up with the new environ

[GENERAL] debugging server connection issue

2016-03-29 Thread Stephen Constable
Hi All, I'm a new-ish sysadmin working on porting legacy scientific code from a local server/client to new supercomputer environment. My work is mostly done, except that my postgres database doesn't seem to be able to keep up with the new environment. The application is written in-house in a mix

Re: [GENERAL] debugging with gdb

2014-07-12 Thread Michael Paquier
On Fri, Jul 11, 2014 at 11:26 PM, Ravi Kiran wrote: > 13)n In gdb, 'n' or 'next' is used to have the debugger switch to the next line, if you want to stop automatically to the next breakpoint, use either 'c' of 'continue'. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgr

[GENERAL] debugging with gdb

2014-07-11 Thread Ravi Kiran
Hi, I am facing some problem with gdb for the past few days. I want to debug nestloop.c in postgresql , so I followed the below steps. I followed the steps given in the below for collecting the stack trace. https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_

Re: [GENERAL] debugging with gdb in postgres

2014-07-08 Thread Jim Mlodgenski
On Tue, Jul 8, 2014 at 12:40 PM, Ravi Kiran wrote: > hi, > > I am trying to learn how postgresql implements the join algorithms. > > So I am trying to learn about the source code of the executor precisely > the file nodenestloop.c . > > In the executor file I have nodenestloop.o but no binary exe

[GENERAL] debugging with gdb in postgres

2014-07-08 Thread Ravi Kiran
hi, I am trying to learn how postgresql implements the join algorithms. So I am trying to learn about the source code of the executor precisely the file nodenestloop.c . In the executor file I have nodenestloop.o but no binary executor file. I am using helios eclipse to edit the source code. I

[GENERAL] debugging with child process

2014-06-30 Thread Ravi Kiran
hi, can any one help me with the 4th and 5th steps of the following link which is to debug with a child process in postgres. *https://wiki.postgresql.org/wiki/Working_with_Eclipse#Debugging_with_child_processes

Re: [GENERAL] debugging functions

2014-03-12 Thread Pavel Stehule
Hello I don't know any tool that can do what you want. You can write your function as fault tolerant - you can trap errors, and you can print a some messages. That is all what is possible Regards Pavel 2014-03-12 20:29 GMT+01:00 Seb : > Hi, > > I am aware of the edb-debugger that one can use

[GENERAL] debugging functions

2014-03-12 Thread Seb
Hi, I am aware of the edb-debugger that one can use with pgadmin for debugging functions. However, I am looking for a solution that doesn't involve such additions to the server. I'm using a function in a SELECT query, but it's failing for some rows in a very large table. By using LIMIT and OFFS

Re: [GENERAL] Debugging of C functions

2013-11-25 Thread hamann . w
>> Hi, >> � >> How is it possible to debug user defined functions written in C. >> I can't just include all the files and run it. >> � >> Does anyone have an idea? >> � >> Janek Sendrowski >> Hi, I recall compiling with debug as normal, adding a printf followed by 30 sec sleep, and use the paus

[GENERAL] Debugging of C functions

2013-11-25 Thread Janek Sendrowski
Hi,   How is it possible to debug user defined functions written in C. I can't just include all the files and run it.   Does anyone have an idea?   Janek Sendrowski -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [GENERAL] Debugging extension with gdb?

2013-11-20 Thread Paul Jones
> > From: Tom Lane >To: Paul Jones >Cc: "pgsql-general@postgresql.org" >Sent: Wednesday, November 20, 2013 9:13 AM >Subject: Re: [GENERAL] Debugging extension with gdb? > > >Paul Jones writes: > >> Can som

Re: [GENERAL] Debugging extension with gdb?

2013-11-20 Thread Tom Lane
Paul Jones writes: > Can someone point me to information on how to debug a Postgres extension > with gdb? I've noticed that on some platforms, it works better to attach gdb to the backend process before you load the extension, but on others, it works better to attach afterwards. You might try t

[GENERAL] Debugging extension with gdb?

2013-11-20 Thread Paul Jones
Can someone point me to information on how to debug a Postgres extension with gdb? I have been able to attach to one but getting breakpoints to work right and getting the addresses to properly relocate (since the extension could be loaded anywhere) has been the problem for me. I have not found

Re: [GENERAL] Debugging Postgres?

2013-08-16 Thread Dennis
Sent: Wednesday, August 14, 2013 9:14 PM To: Barth Weishoff Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Debugging Postgres? Hi, Having a look at the PostgreSQL log may help. http://stackoverflow.com/questions/71/how-to-log-postgres-sql-queries You could also try logging in via

Re: [GENERAL] Debugging Postgres?

2013-08-15 Thread Steve Crawford
On 08/13/2013 01:51 PM, Barth Weishoff wrote: Hello I'm having an interesting issue with PGSQL. It seems that I'm experiencing timeouts at various times. The servers are not busy and have plenty of resources. The databases are ~50GB in size, the systems typically have 8-12GB physical

Re: [GENERAL] Debugging Postgres?

2013-08-14 Thread Jayadevan M
Hi, Having a look at the PostgreSQL log may help. http://stackoverflow.com/questions/71/how-to-log-postgres-sql-queries You could also try logging in via psql on the database host itself, to ensure it is not a network issue. Regards, Jayadevan On Wed, Aug 14, 2013 at 2:21 AM, Barth Weishoff

[GENERAL] Debugging Postgres?

2013-08-14 Thread Barth Weishoff
Hello I'm having an interesting issue with PGSQL. It seems that I'm experiencing timeouts at various times. The servers are not busy and have plenty of resources. The databases are ~50GB in size, the systems typically have 8-12GB physical RAM, and the connections are low (less than 15 at a

[GENERAL] debugging postgres server memory checker

2012-02-29 Thread Dave Potts
hi List, As a result of writing a C 'postgres' function, I have a memory corruption problem. Something is either being free twice or I am accessing beyond the data structure and corrupting the malloc/free/sbrk memory pool. My attempts to memory support in glibc, that been stopped because someth

Re: [GENERAL] debugging the server[ module causes server cash]

2012-02-04 Thread Tom Lane
Dave Potts writes: > I have just inherited a private C module that lives in the context of > the server with little or no documentation. > It crashes taking the database down, is there any advice on how to > debug this type of beast ? It isn't a lot different from debugging code that's part of

Re: [GENERAL] debugging the server[ module causes server cash]

2012-02-04 Thread m...@trausch.us
On 02/04/2012 02:37 AM, Dave Potts wrote: > I have just inherited a private C module that lives in the context of > the server with little or no documentation. > > It crashes taking the database down, is there any advice on how to > debug this type of beast ? > > This is not a problem with the p

Re: [GENERAL] debugging the server[ module causes server cash]

2012-02-03 Thread John R Pierce
On 02/03/12 11:37 PM, Dave Potts wrote: Hi I have just inherited a private C module that lives in the context of the server with little or no documentation. It crashes taking the database down, is there any advice on how to debug this type of beast ? This is not a problem with the postgres se

[GENERAL] debugging the server[ module causes server cash]

2012-02-03 Thread Dave Potts
Hi I have just inherited a private C module that lives in the context of the server with little or no documentation. It crashes taking the database down, is there any advice on how to debug this type of beast ? This is not a problem with the postgres server but user module. -- Sent via pgsql

Re: [GENERAL] Debugging pgsql function date error

2009-05-28 Thread Adrian Klaver
On Thursday 28 May 2009 5:36:10 pm Rory Campbell-Lange wrote: > I have a long plpgsql function which takes a date as one of its > arguments but I am receiving an error for another date! I'm using 8.3 on > Debian. > > CREATE OR REPLACE FUNCTION > fn_alert01_maker(integer, integer, integer, integ

[GENERAL] Debugging pgsql function date error

2009-05-28 Thread Rory Campbell-Lange
I have a long plpgsql function which takes a date as one of its arguments but I am receiving an error for another date! I'm using 8.3 on Debian. CREATE OR REPLACE FUNCTION fn_alert01_maker(integer, integer, integer, integer, date, integer) RETURNS SETOF alert_info AS $$ DECLARE userid

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread berdam
asdfasdfasdfasdfasdfasdfasdfasdfasdfasd asdfasdff asdfasdfasdfasdfasdfasdfasdfasdfasdfasd asdfasdff asdfasdfasdfasdfasdfasdfasdfasdfasdfasd asdfasdff asdfasdfasdf

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread Dave Page
On Tue, Mar 24, 2009 at 1:42 PM, josep porres wrote: > i've just upgraded the server to 8.3.7 holding the same data directory > > select * from pldbg_get_proxy_info(); > "serverversionstr","serverversionnum","proxyapiver","serverprocessid" > "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread josep porres
by the way, after upgrading, i get the same behaviour even executing the function in a query window created after setting the breakpoint. 2009/3/24 josep porres > i've just upgraded the server to 8.3.7 holding the same data directory > > select * from pldbg_get_proxy_info(); > "serverversionstr"

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread josep porres
i've just upgraded the server to 8.3.7 holding the same data directory select * from pldbg_get_proxy_info(); "serverversionstr","serverversionnum","proxyapiver","serverprocessid" "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)",80300,3,2948 is it ok fo

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread Dave Page
On Tue, Mar 24, 2009 at 7:50 AM, josep porres wrote: > Ooops,   I haven't realized the second schema, I've found the function. > Here you are your test log. OK, I think we've tracked down the problem. Can I send you some updated DLLs to try offlist? -- Dave Page EnterpriseDB UK: http://www.e

Re: [GENERAL] debugging in pgadmin

2009-03-24 Thread josep porres
good morning, I have a demo database, but it's empty. if you tell me where is the creation script, I will try it 2009/3/23 Dave Page > On Mon, Mar 23, 2009 at 1:56 PM, josep porres wrote: > > well, now a log with only trying to debug setting a breakpoint > > Hmmm - do you still have the demo s

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Dave Page
On Mon, Mar 23, 2009 at 1:56 PM, josep porres wrote: > well, now a log with only trying to debug setting a breakpoint Hmmm - do you still have the demo schema on that server? Can you try setting a breakpoint on the list_emp() function, and then calling it please? -- Dave Page EnterpriseDB UK:

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
in the previous action, first of all I made a breakpoint and called the function from a query window. nothing happened, the only thing i got: the result. All actions are in the previous log. Is it what you want? 2009/3/23 Dave Page > On Mon, Mar 23, 2009 at 1:41 PM, josep porres wrote: > > tha

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Dave Page
On Mon, Mar 23, 2009 at 1:41 PM, josep porres wrote: > that way I can debug =) OK, so in that case can I get a log of an attempt to set a global breakpoint please? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Dave Page
On Mon, Mar 23, 2009 at 1:07 PM, josep porres wrote: > "serverversionstr","serverversionnum","proxyapiver","serverprocessid" > "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 > (mingw-special)",80300,3,4220 That should work, despite the mismatch in build envs (ignore

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
"serverversionstr","serverversionnum","proxyapiver","serverprocessid" "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)",80300,3,4220 2009/3/23 Dave Page > On Mon, Mar 23, 2009 at 12:50 PM, josep porres wrote: > > yes, i have: > > shared_preload_libra

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Dave Page
On Mon, Mar 23, 2009 at 12:50 PM, josep porres wrote: > yes, i have: > shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'        # > (change requires restart) Whats the output from: select * from pldbg_get_proxy_info(); -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
it is Postgres Plus 8.3 Postgres 8.3.4 build 1400 2009/3/23 josep porres > yes, i have: > shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'# > (change requires restart) > > > 2009/3/23 Dave Page > > On Mon, Mar 23, 2009 at 12:40 PM, josep porres wrote: >> > mmm... my

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
yes, i have: shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'# (change requires restart) 2009/3/23 Dave Page > On Mon, Mar 23, 2009 at 12:40 PM, josep porres wrote: > > mmm... my database schema have the pldbg functions. > > Do you have something like this in your post

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Dave Page
On Mon, Mar 23, 2009 at 12:40 PM, josep porres wrote: > mmm...  my database schema have the pldbg functions. Do you have something like this in your postgresql.conf: shared_preload_libraries = '$libdir/plugins/plugin_debugger.so' ? If not, add it, and restart the server (if you're on Windows,

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
mmm... my database schema have the pldbg functions. 2009/3/23 Glyn Astill > > > --- On Mon, 23/3/09, josep porres wrote: > > > A lot of time since the last debugging activity. > > I don't remember how to debug. I thought I had to set a > > breaking point in > > the function i want to debug, >

Re: [GENERAL] debugging in pgadmin

2009-03-23 Thread Glyn Astill
--- On Mon, 23/3/09, josep porres wrote: > A lot of time since the last debugging activity. > I don't remember how to debug. I thought I had to set a > breaking point in > the function i want to debug, > and then call that function. > I'm doing this, and from another query window, i call > the

[GENERAL] debugging in pgadmin

2009-03-23 Thread josep porres
Hi all A lot of time since the last debugging activity. I don't remember how to debug. I thought I had to set a breaking point in the function i want to debug, and then call that function. I'm doing this, and from another query window, i call the function. But it returns me the result, but it does

Re: [GENERAL] Debugging custom type libraries

2009-02-18 Thread Tom Lane
Martijn van Oosterhout writes: > First step, you must connect with psql and then attach gdb to the > running process (there's a function to get the pid of your backend). > Next, you can use "LOAD foo" in psql to trigger the loading of your > module, gdb should then be able to see it (assuming you

Re: [GENERAL] Debugging custom type libraries

2009-02-18 Thread Martijn van Oosterhout
On Wed, Feb 18, 2009 at 06:05:43PM +, Will Harrower wrote: > I'm writing a custom type, with the associated functions (type_in, > type_out, etc) written in C, in an external shared library that Postgres > loads at runtime. I was wondering what the best way of debugging these > functions is..

[GENERAL] Debugging custom type libraries

2009-02-18 Thread Will Harrower
Hi, I'm writing a custom type, with the associated functions (type_in, type_out, etc) written in C, in an external shared library that Postgres loads at runtime. I was wondering what the best way of debugging these functions is... I can start postgres through gdb, but can't figure out how to

Re: [GENERAL] debugging plpgsql functions

2009-02-04 Thread justin
Chris wrote: Hi all, I have a few plpgsql functions to debug to see why they are slow. They consist of a bunch of sql statements using new.* / old.* variables (ie not using "EXECUTE", the sql is being called directly). Is there a way to capture the actual sql that's being executed with vari

[GENERAL] debugging plpgsql functions

2009-02-04 Thread Chris
Hi all, I have a few plpgsql functions to debug to see why they are slow. They consist of a bunch of sql statements using new.* / old.* variables (ie not using "EXECUTE", the sql is being called directly). Is there a way to capture the actual sql that's being executed with variables substitu

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-05 Thread Jason Long
Greg Smith wrote: On Mon, 3 Nov 2008, Jason Long wrote: For some reason Postgres is pegging my CPU and I can barely log on to reboot the machine. Take a look at pg_stat_activity when this happens to see what's going on. Also, try running "top -c" to see what is going on (the -c displays ext

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-05 Thread Greg Smith
On Mon, 3 Nov 2008, Jason Long wrote: For some reason Postgres is pegging my CPU and I can barely log on to reboot the machine. Take a look at pg_stat_activity when this happens to see what's going on. Also, try running "top -c" to see what is going on (the -c displays extra information for

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Chris
Jason Long wrote: Scott Marlowe wrote: On Mon, Nov 3, 2008 at 12:25 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Mon, Nov 3, 2008 at 11:30 AM, Jason Long <[EMAIL PROTECTED]> wrote: I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600 MHz, 12 MB cache, 3.0 GHz qu

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Jason Long
Scott Marlowe wrote: On Mon, Nov 3, 2008 at 12:25 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Mon, Nov 3, 2008 at 11:30 AM, Jason Long <[EMAIL PROTECTED]> wrote: I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600 MHz, 12 MB cache, 3.0 GHz quad core, and 4 GB R

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Scott Marlowe
On Mon, Nov 3, 2008 at 12:25 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Mon, Nov 3, 2008 at 11:30 AM, Jason Long > <[EMAIL PROTECTED]> wrote: >> I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600 >> MHz, 12 MB cache, 3.0 GHz quad core, and 4 GB RAM. >> >> My database i

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Scott Marlowe
On Mon, Nov 3, 2008 at 11:30 AM, Jason Long <[EMAIL PROTECTED]> wrote: > I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600 > MHz, 12 MB cache, 3.0 GHz quad core, and 4 GB RAM. > > My database is only about 50 MB and there are only about 20 users. > > For some reason Postgres

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Tom Lane
Jason Long <[EMAIL PROTECTED]> writes: > For some reason Postgres is pegging my CPU and I can barely log on to > reboot the machine. Well, you need to find out why. Turning on query logging (see log_statement) would probably be a good first step --- it'd help you determine if there's a specific

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Alan Hodgson
On Monday 03 November 2008, Jason Long <[EMAIL PROTECTED]> wrote: > I would greatly appreciate any advice on debugging this problem. While > there are relatively live few users the data is extremely important and > the users will not wait for me to see what is wrong. They demand > immediate reso

[GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Jason Long
I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600 MHz, 12 MB cache, 3.0 GHz quad core, and 4 GB RAM. My database is only about 50 MB and there are only about 20 users. For some reason Postgres is pegging my CPU and I can barely log on to reboot the machine. After reboo

Re: R: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Peter Geoghegan
Paolo, Oh yes, I see it now. It was necessary to re-initialise the database in order for that to appear, which I have not done until now. Now I have a new problem. When I attempt to install postgres 8.3.1 with postgres automatically creating its own user account, the installer complains: "Servic

Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Raymond O'Donnell
On 09/04/2008 11:50, Peter Geoghegan wrote: I recall that in earlier versions of the PostgreSQL windows binary distribution, I had finer grained control of what modules were installed. The only optional module is now PL/Java, which I don't use, and things like headers and libraries. I cannot spe

Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Dave Page
On Wed, Apr 9, 2008 at 12:22 PM, Richard Huxton <[EMAIL PROTECTED]> wrote: > Peter Geoghegan wrote: > > > Richard, > > > > I recall that in earlier versions of the PostgreSQL windows binary > > distribution, I had finer grained control of what modules were > > installed. The only optional module is

Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Richard Huxton
Peter Geoghegan wrote: Richard, I recall that in earlier versions of the PostgreSQL windows binary distribution, I had finer grained control of what modules were installed. The only optional module is now PL/Java, which I don't use, and things like headers and libraries. I cannot specify install

R: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Paolo Saudin
>-Messaggio originale- >Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Peter Geoghegan >Inviato: mercoledì 9 aprile 2008 12.50 >A: Richard Huxton >Cc: pgsql-general@postgresql.org >Oggetto: Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib

Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Peter Geoghegan
Richard, I recall that in earlier versions of the PostgreSQL windows binary distribution, I had finer grained control of what modules were installed. The only optional module is now PL/Java, which I don't use, and things like headers and libraries. I cannot specify installing Pl/PgSQL, Pl/Perl etc

Re: [GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Richard Huxton
Peter Geoghegan wrote: Hello, I'm developing a large postgreSQL database front end application on win32. I'd consider the ability to debug Pl/PgSQL functions highly desirable. Until now, I've been using RAISE NOTICE debugging, which is equivalent to printf debugging, and is sub optimal. "Sub o

[GENERAL] Debugging Pl/PgSQL functions with the debug contrib module

2008-04-09 Thread Peter Geoghegan
Hello, I'm developing a large postgreSQL database front end application on win32. I'd consider the ability to debug Pl/PgSQL functions highly desirable. Until now, I've been using RAISE NOTICE debugging, which is equivalent to printf debugging, and is sub optimal. I am aware of the possibility of

Re: [GENERAL] Debugging postgresql source on gdb

2007-07-22 Thread Shreya Bhargava
Thanks very much for the suggestions! will try them out regards, Shreya Sibte Abbas <[EMAIL PROTECTED]> wrote: On 7/22/07, Sibte Abbas wrote: > On 7/22/07, Tom Lane wrote: > > Shreya Bhargava writes: > > > 1. gdb postgres > > > 2. set args -D test (test is my dbcluster) > > > 3. b h

Re: [GENERAL] Debugging postgresql source on gdb

2007-07-22 Thread Sibte Abbas
On 7/22/07, Sibte Abbas <[EMAIL PROTECTED]> wrote: On 7/22/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Shreya Bhargava <[EMAIL PROTECTED]> writes: > > 1. gdb postgres > > 2. set args -D test (test is my dbcluster) > > 3. b hashbuild(this is the function i want to break on) > > 4. run > > You've set

Re: [GENERAL] Debugging postgresql source on gdb

2007-07-22 Thread Sibte Abbas
On 7/22/07, Tom Lane <[EMAIL PROTECTED]> wrote: Shreya Bhargava <[EMAIL PROTECTED]> writes: > 1. gdb postgres > 2. set args -D test (test is my dbcluster) > 3. b hashbuild(this is the function i want to break on) > 4. run You've set the breakpoint in the postmaster process. It won't propagate t

Re: [GENERAL] Debugging postgresql source on gdb

2007-07-21 Thread Tom Lane
Shreya Bhargava <[EMAIL PROTECTED]> writes: > 1. gdb postgres > 2. set args -D test (test is my dbcluster) > 3. b hashbuild(this is the function i want to break on) > 4. run You've set the breakpoint in the postmaster process. It won't propagate to child backends, at least not without special gdb

[GENERAL] Debugging postgresql source on gdb

2007-07-21 Thread Shreya Bhargava
Hi, I am trying to debug postgres source code using gdb. I set a breakpoint on a function, but it never stops when it reaches that function. Here are the steps: 1. gdb postgres 2. set args -D test (test is my dbcluster) 3. b hashbuild(this is the function i want to break on) 4. run 5. start a cl

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-07 Thread Dave Page
David Gardner wrote: As someone who would greatly benefit from this feature, is there something I can do to help out in development/testing of this feature? I have a test server I could install a cvs release of pgsql and know my way around a makefile. Hi David, At the moment it's just a case o

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-06 Thread David Gardner
- >> From: David Gardner <[EMAIL PROTECTED]> >> To: "'Dave Page'" <[EMAIL PROTECTED]> >> Sent: 06/06/07, 00:14:52 >> Subject: RE: pl/pgsql debuging, was Re: [GENERAL] debugging C functions >> >> I grabbed the May 10th dev sn

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-06 Thread Dave Page
> --- Original Message --- > From: David Gardner <[EMAIL PROTECTED]> > To: "'Dave Page'" <[EMAIL PROTECTED]> > Sent: 06/06/07, 00:14:52 > Subject: RE: pl/pgsql debuging, was Re: [GENERAL] debugging C functions > > I grabbed the May

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread David Gardner
uging, was Re: [GENERAL] debugging C functions > --- Original Message --- > From: "Pavel Stehule" <[EMAIL PROTECTED]> > To: "David Gardner" <[EMAIL PROTECTED]> > Sent: 05/06/07, 21:01:49 > Subject: Re: pl/pgsql debuging, was Re: [GENERA

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread Dave Page
> --- Original Message --- > From: "Pavel Stehule" <[EMAIL PROTECTED]> > To: "David Gardner" <[EMAIL PROTECTED]> > Sent: 05/06/07, 21:01:49 > Subject: Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions > > 2007/6/5, Da

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread Pavel Stehule
2007/6/5, David Gardner <[EMAIL PROTECTED]>: This post got me thinking, is there a similar procedure for PL/pgSQL functions? No. You can debug PL/pgSQL function via debug plugin API. Currently exists only one debugger, which can do it - Enterprisedb debugger. Regards Pavel Stehule --

pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread David Gardner
: pgsql-general@postgresql.org Subject: Re: [GENERAL] debugging C functions Islam Hegazy wrote: > I wrote a C function to call from PostgreSQL8.2.4 under Linux. The > functions returns unexpected results. I did an extensive analysis to the > function and it seems correct. I want to know if

Re: [GENERAL] debugging C functions

2007-06-04 Thread Islam Hegazy
" <[EMAIL PROTECTED]> Cc: "Tom Lane" <[EMAIL PROTECTED]>; "Joe Conway" <[EMAIL PROTECTED]>; Sent: Monday, June 04, 2007 5:50 AM Subject: Re: [GENERAL] debugging C functions "Islam Hegazy" <[EMAIL PROTECTED]> writes: I do the same

  1   2   >