Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Дата
Msg-id 200907141518.16021.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Ответ на SPI_ERROR_CONNECT within pl/pgsql, PG 8.4  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Ответы Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Список pgsql-bugs
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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Frank van Vugt
Дата:
Сообщение: Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Следующее
От: "Michael Gould"
Дата:
Сообщение: BUG #4920: need case-insensitive searches