Re: [HACKERS] How do I get the backend server into gdb?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] How do I get the backend server into gdb?
Дата
Msg-id 18123.925425226@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] How do I get the backend server into gdb?  (Massimo Dal Zotto <dz@cs.unitn.it>)
Ответы Re: [HACKERS] How do I get the backend server into gdb?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Massimo Dal Zotto <dz@cs.unitn.it> writes:
> The -W option is passed to the backend which sleeps 15 seconds before doing
> any work. In the meantime you have the time to do a ps, find the backend pid
> and attach gdb to the process.
> Obviously you can't do that in a production environment because it adda a
> fixed delay for each connection which will make your users very angry.

Since it's a -o option, I see no need to force it to be used on every
connection.  Instead start psql with environment variablePGOPTIONS="-W 15"
or whatever you need for the particular session.  The PGOPTIONS are sent
in the connection request and then catenated to whatever the postmaster
might have in its -o switch.

(BTW, it might be a good idea to go through the backend command-line
switches carefully and see if any of them could be security holes.
I'm feeling paranoid because of Matthias Schmitt's unresolved report...)
        regards, tom lane


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

Предыдущее
От: Michael J Davis
Дата:
Сообщение: Problem with insert into select from using aggregation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PLpgSQL Stat Problem