Re: Need a debugging tip or two

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Need a debugging tip or two
Дата
Msg-id 200101220635.BAA23115@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Need a debugging tip or two  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I see the mention of -w in the main FAQ.

> Peter Eisentraut <peter_e@gmx.net> writes:
> > There's probably little reason to start a backend standalone.  If you want
> > to do stock-of-the-trade debugging you simply start a postmaster, then
> > psql (or whatever floats your boat), and attach gdb to the resulting
> > backend process.
> 
> Right, that's what I always do (unless I have to debug a crash at initdb
> time :-().  A tip here is that you can even debug backend-startup-time
> problems this way, and no you don't have to be superhumanly quick on the
> trigger: you set PGOPTIONS="-W n" in the environment of psql.  This
> will cause an n-second sleep() call very early in the backend startup
> process.  I find 30 seconds plenty of time to run ps, start gdb, and
> attach.  You can also throw in things like "-d2" to crank up the
> postmaster log level for just the backend under test.
> 
> I thought this lore was in the developer's FAQ already, but I don't
> see it there at the moment.  Bruce, is it lurking someplace else?
> 
>             regards, tom lane
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Marko Kreen
Дата:
Сообщение: update to contrib/pgcrypto
Следующее
От: Magnus Hagander
Дата:
Сообщение: FW: Postgresql on win32