Re: Segmentation Fault

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Segmentation Fault
Дата
Msg-id 4FD6F271.5030905@ringerc.id.au
обсуждение исходный текст
Ответ на Re: Segmentation Fault  (Benson Jin <benson.jin@troo.com>)
Список pgsql-general
On 06/12/2012 03:15 AM, Benson Jin wrote:
Hi All,

A silly question.... how do I get install external symbols for postgresql, if compiled it myself previously? Do I recompile it with --enable-debug option?

If you didn't strip the executable then the cores produced even without --enable-debug will be somewhat useful, but debug info is ideal. You could try that first, since it'll give you a chance to make sure you can at least get and analyse a core file before spending time recompiling and reinstalling Pg.

Recompiling with --enable-debug is the easy way to get executables with debug info embedded in them. If the installed libraries, etc haven't changed since compiling your original copy of PostgreSQL, and if you're compiling the EXACT same source code, you can debug the core against these executables without replacing the ones you're actually running. Something like a libc upgrade since the original copies were built might mean that the new debug executables are no longer exactly compatible with the ones your core file came from, though, so the results can't be totally trusted.

Ideally you want to run the debug executables and get the core to debug from them. An --enable-debug build on gcc will still be optimised and should have no detectable performance difference. The executables are huge, but the ELF sections containing the debug info never get mapped in, so it doesn't actually matter.

An alternative is to build with --enable-debug, strip the debug info into external symbols packages using "strip --only-keep-debug". There isn't much point unless disk space consumed by executables is a big concern, though.

I always use --enable-debug when building Pg. I rarely need the symbols, but it's handy to have them when I do.

--
Craig Ringer

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

Предыдущее
От: Sachin Srivastava
Дата:
Сообщение: Re: Postgres 9.2 beta2 one-click installer on windows
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Question about load balance