From owner-freebsd-ports@FreeBSD.ORG Sat Jan 31 04:40:48 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AB1B16A4CE for ; Sat, 31 Jan 2004 04:40:48 -0800 (PST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2668943D45 for ; Sat, 31 Jan 2004 04:40:41 -0800 (PST) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 873483D28; Sat, 31 Jan 2004 07:40:39 -0500 (EST) From: "Dan Langille" To: Palle Girgensohn Date: Sat, 31 Jan 2004 07:40:39 -0500 MIME-Version: 1.0 Message-ID: <401B5BF7.437.19BA2FB0@localhost> Priority: normal In-reply-to: <72570000.1075522008@palle.girgensohn.se> References: <401AC855.2067.177977F8@localhost> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: ports@freebsd.org Subject: Re: databases/postgresql7 dump + restore didn't include pgcrypto functions X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2004 12:40:48 -0000 On 31 Jan 2004 at 5:06, Palle Girgensohn wrote: > Hi Dan, > > undefined symbol "elog"... From what I can see in the error message below, > the pgcrypto.so file was not missing, but the symbol "elog" in pgcrypto.so > was not found. Did you update the databases/postgresql-contrib port when > updating databases-postgresql7? Seems likely that a 7.3.* pgcrypto.so might > not accept a postgresql-7.4 environment. I did not update the databases/postgresql-contrib port. I didn't use that port at all. I installed from the contrib/pgcrypo subdirectory under databases/posgresql7. > ... checking... Hmm... the elog function is not in the postgres binary > anymore. This is most likely the problem. I am not a linker wizard, but > browsing the different binaries gives me a clue: > > pg-7.4 system $ nm -D /usr/local/bin/postgres | grep elog > 0818e100 T elog > 081015bc T elog_node_display > > pg-7.3 system $ nm -D /usr/local/bin/postgres | grep elog > 081ac188 T elog_finish > 08116e28 T elog_node_display > > If I'm not wrong, this means that postgresql functions, at least those > programmed in C and using elog, must be rebuilt when updating the server > 7.3 -> 7.4. OK, let's confirm that with the PostgreSQL hackers. I'll do that if you wish. > Perhaps adding a reminder somewhere could help. Any suggestions as to where > to put such a reminder? How about an echo in the Makefile? > > /Palle > > --On fredag, januari 30, 2004 21.10.45 -0500 Dan Langille > wrote: > > > Hi folks, > > > > I upgraded two servers today from 7.3.* to 7.4.1. In both cases, the > > pgcrypto functions were excluded. I used pg_dumpall to create the > > output. Examining the dump file I see this: > > > > connect "working-copy.freshports.org" > > -- > > -- PostgreSQL database dump > > -- > > > > SET SESSION AUTHORIZATION 'dan'; > > > > SET search_path = public, pg_catalog; > > > > -- > > -- TOC entry 235 (OID 19127468) > > -- Name: digest (text, text); Type: FUNCTION; Schema: public; Owner: > > dan > > -- > > > > CREATE FUNCTION digest (text, text) RETURNS bytea > > AS '$libdir/pgcrypto', 'pg_digest' > > LANGUAGE c; > > > > But within that database, there is no digest function: > > > > working-copy.freshports.org=# \df digest > > List of functions > > Result data type | Schema | Name | Argument data types > > ------------------+--------+------+--------------------- > > (0 rows) > > > > working-copy.freshports.org=# > > > > The cause of the problem is illustrated by this attempt to manually > > create the functions: > > > > freshports=# CREATE FUNCTION digest (text, text) RETURNS bytea > > freshports-# AS '$libdir/pgcrypto', 'pg_digest' > > freshports-# LANGUAGE c; > > ERROR: could not load library > > "/usr/local/lib/postgresql/pgcrypto.so": dlopen > > '/usr/local/lib/postgresql/pgcrypto.so' failed. (/us > > r/local/lib/postgresql/pgcrypto.so: Undefined symbol "elog") > > > > It appears that the libraries were removed. Does that make sense? > > > > I upgraded using portupgrade. I wonder if that's why > > /usr/local/lib/postgresql was blown away.... > > > > What I had to do was recompile and install contrib/pgcrypto and then > > import the functions. > > > > FWIW: I was using the FreeBSD port on 4.9-STABLE. -- Dan Langille : http://www.langille.org/ BSDCan - http://www.bsdcan.org/