| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | noordsij <noordsij(at)cs(dot)helsinki(dot)fi> |
| Cc: | Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
| Subject: | Re: BUG #6086: Segmentation fault |
| Date: | 2011-07-26 18:07:17 |
| Message-ID: | 13571.1311703637@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
noordsij <noordsij(at)cs(dot)helsinki(dot)fi> writes:
> After a few hours of watching strange things happening I finally stumbled
> on the cause.
> Very short summary: the postgres binary needs to be linked to libpthread,
> as this will ensure a special fork() inside libthr (the FreeBSD libpthread
> implementation/wrapper) is used which correctly deals with any pthread
> usage (I am guessing especially statically initialized pthread_X variables
> in for example libxml2).
> This can be accomplished by adding "-lpthread" to the LDFLAGS when building
> either libxml2 or postgresql itself, or by preloading libpthread.so when
> starting postgresql.
Linking pthreads into the backend is likely to cause more problems than
it solves, especially if you're proposing that we do that everywhere.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | noordsij | 2011-07-26 22:23:07 | Re: BUG #6086: [SOLVED] Segmentation fault |
| Previous Message | Greg Johnson | 2011-07-26 17:56:55 | Re: BUG #6127: pg_restore failing: unexpected message type 0x58 during COPY from stdin |