Re: psql won't stayed connected - Mailing list pgsql-admin

From Tom Lane
Subject Re: psql won't stayed connected
Date
Msg-id 11712.1091803301@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql won't stayed connected  ("Kevin Izzet" <Kevin.Izzet@nsc.com>)
List pgsql-admin
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Thanks for the reply but forgive my ignorance but how do I setup the
> debugger breakpoint ?

Something like this:

    PGOPTIONS="-W 30" psql ...
    Use ps to determine PID of backend connected to psql
    gdb /path/to/postgres-executable PID-of-backend
    gdb> break proc_exit
    gdb> continue
    (wait for rest of timeout to expire)
    gdb will report reaching proc_exit breakpoint
    gdb> bt
    ... interesting result is here ...
    gdb> quit

If you've never done this before it will probably take you more than 30
seconds to get into gdb --- adjust the W option accordingly.

            regards, tom lane

pgsql-admin by date:

Previous
From: Edgars
Date:
Subject: postgresql DB backing up within specific interval
Next
From: pginfo
Date:
Subject: Re: postgresql DB backing up within specific interval