Hi Marek,

> Could you please send me gdb
> commands - I could also provide the backtrace

Basically the flow is as follows:

- identify the backend that you expect to run in to this error by pid

- start gdb with the option "-p <pid>" to attach to this backend

- set a conditional breakpoint:
        break SPI_connect if _SPI_curid != _SPI_connected
gdb should confirm this with something like Breakpoint 1 at 0x54af60

- tell gdb to ignore SIGUSR1:
        handle SIGUSR1 nostop
gdb should confirm this with something like:
        Signal        Stop      Print   Pass to program Description
        SIGUSR1       No        Yes     Yes             User defined signal 1

- tell gdb to ignore SIGUSR2:
        handle SIGUSR2 nostop
gdb should confirm this with something like:
        Signal        Stop      Print   Pass to program Description
        SIGUSR2       No        Yes     Yes             User defined signal 2

- type 'c' to allow the backend to continue

- reproduce the problem in your application, the moment you do it will seem to 
'freeze' (so you will _not_ see any error message you usually were seeing, at 
least not yet), because gdb will have catched the situation and should now 
show a prompt again

- type 'bt' to get a backtrace, just copy&paste&post ;)

You can quit gdb by a plain <ctrl>-c, just confirm when it asks you to detach. 
The backend will continue to run, your app should now show the error.





-- 
Best,




Frank.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to