NetBSD Problem Report #45304
From www@NetBSD.org Sun Aug 28 20:57:04 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id CEA0E63BAC3
for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Aug 2011 20:57:03 +0000 (UTC)
Message-Id: <20110828205703.4EC9963B8E2@www.NetBSD.org>
Date: Sun, 28 Aug 2011 20:57:03 +0000 (UTC)
From: tnn@NetBSD.org
Reply-To: tnn@NetBSD.org
To: gnats-bugs@NetBSD.org
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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 28 21:00:01 +0000 2011
>Closed-Date: Sun Aug 20 18:33:23 +0000 2017
>Last-Modified: Sun Aug 20 18:33:23 +0000 2017
>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.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 29 Aug 2011 09:26:13 +0000
Responsible-Changed-Why:
Over to maintainer.
State-Changed-From-To: open->closed
State-Changed-By: adam@NetBSD.org
State-Changed-When: Sun, 20 Aug 2017 18:33:23 +0000
State-Changed-Why:
postgresql90 is no longer with us. If the problem occurs for newer PostgreSQL, please, file another PR.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.