NetBSD Problem Report #45304

From  Sun Aug 28 20:57:04 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id CEA0E63BAC3
	for <>; Sun, 28 Aug 2011 20:57:03 +0000 (UTC)
Message-Id: <>
Date: Sun, 28 Aug 2011 20:57:03 +0000 (UTC)
Subject: postgresql90-server, streaming replication and pthread linkage
X-Send-Pr-Version: www-1.0

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

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/": dlopen (/usr/pkg/lib/postgresql/ failed: Cannot dlopen non-loadable /usr/lib/

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/ /usr/pkg/bin/pg_ctl"

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



Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-When: Mon, 29 Aug 2011 09:26:13 +0000
Over to maintainer.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.