pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45304: postgresql90-server, streaming replication and pthread linkage



>Number:         45304
>Category:       pkg
>Synopsis:       postgresql90-server, streaming replication and pthread linkage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 28 21:00:01 +0000 2011
>Originator:     Tobias Nygren
>Release:        5.99.55
>Organization:
TNF
>Environment:
amd64
>Description:
When starting up a Streaming Replication slave, the postmaster tries to dlopen 
libpqwalreceiver.so. This doesn't work because libpqwalreceiver is linked 
against libpthread.so, but the postmaster itself isn't.

>How-To-Repeat:
Try to set up a master-slave cluster with Streaming Replication.
Observe error message when starting slave:

FATAL:  could not load library "/usr/pkg/lib/postgresql/libpqwalreceiver.so": 
dlopen (/usr/pkg/lib/postgresql/libpqwalreceiver.so) failed: Cannot dlopen 
non-loadable /usr/lib/libpthread.so.1


>Fix:
A workaround is to patch the startup script in 
/usr/pkg/share/examples/rc.d/pgsql to use LD_PRELOAD:

- command="/usr/pkg/bin/pg_ctl"
+ command="/usr/bin/env LD_PRELOAD=/usr/lib/libpthread.so /usr/pkg/bin/pg_ctl"

Maybe we need to link the main postgres binaries with libpthread.



Home | Main Index | Thread Index | Old Index