From: | "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Using gdb to obtain statement |
Date: | 2005-08-24 15:53:59 |
Message-ID: | 2266D0630E43BB4290742247C891057507ECD997@dozer.computec.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello!
As pg_stat_activity.current_query truncates statements to about 255
characters, I've tinkered a bit with gdb, as suggested by Tom Lane a
little while ago. But when I attach to the backend in question, the only
output I get from p debug_query_string is some number, for example:
mysrv:/var/log # gdb /opt/pgsql/bin/postgres 1485
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i586-suse-linux"...
Attaching to program: /opt/pgsql/bin/postgres, process 1485
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libreadline.so.4...done.
Loaded symbols for /lib/libreadline.so.4
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
0x40198cd4 in read () from /lib/i686/libc.so.6
(gdb) p debug_query_string
$1 = 137763608
What am I doing wrong?
Kind regards
Markus
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Browne | 2005-08-24 15:54:42 | Re: Postgresql replication |
Previous Message | David Fetter | 2005-08-24 15:40:50 | Re: [OT?] ETL tools |