Обсуждение: createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6
createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6
От
OpenMacNews
Дата:
hi all,
i've a successful install of pgsql 8b5 on OSX 10.3.6.
trying to install pl/pgsql:
% createlang plpgsql template1
results in an immediate error:
createlang: language installation failed: ERROR: could not load library
"/usr/local/pgsql/lib/plpgsql.so": dyld: /usr/local/pgsql/bin/postmaster
Undefined symbols:
/usr/local/pgsql/lib/plpgsql.so undefined reference to
_SPI_restore_connection expected to be defined in the executable
a similar error is generated by attempts to install pl/tcl, pl/perl or pl/python
googl'ing on "SPI_restore_connection" results in 0 hits. nada.
suggestions as to where to start?
thx,
richard
OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com> writes:
> createlang: language installation failed: ERROR: could not load library
> "/usr/local/pgsql/lib/plpgsql.so": dyld: /usr/local/pgsql/bin/postmaster
> Undefined symbols:
> /usr/local/pgsql/lib/plpgsql.so undefined reference to
> _SPI_restore_connection expected to be defined in the executable
You seem to be trying to load a current plpgsql.so into a less than
current backend. SPI_restore_connection() was just added a few days
ago ...
regards, tom lane
hi tom,
thx for the reply =)
> You seem to be trying to load a current plpgsql.so into a less than
> current backend. SPI_restore_connection() was just added a few days
> ago ...
just getting used to pgsql terminology, but i presume by 'backend' you simply
mean version of pgsql iteslf, yes?
to that end,
% postmaster --version
postmaster (PostgreSQL) 8.0.0beta5
% ls -alt postgresql-8.0.0beta5.tar.gz
-rw-r--r-- 1 devuser wheel 13501406 Nov 30 16:50
postgresql-8.0.0beta5.tar.gz
% ls -alt /usr/local/pgsql/bin/postgres
-rwxr-xr-x 1 devuser wheel 10725396 Nov 30 17:41
/usr/local/pgsql/bin/postgres
% ls -alt /usr/local/pgsql/lib/plpgsql.so
-rwxr-xr-x 1 devuser wheel 403892 Nov 30 17:44
/usr/local/pgsql/lib/plpgsql.so
% createlang --version
createlang (PostgreSQL) 8.0.0beta5
then, still,
% createlang plpgsql template1
Password: xxxxxx
createlang: language installation failed: ERROR: could not load library
"/usr/local/pgsql/lib/plpgsql.so": dyld: /usr/local/pgsql/bin/postmaster
Undefined symbols:
/usr/local/pgsql/lib/plpgsql.so undefined reference to _SPI_restore_connection
expected to be defined in the executable
i _think_ i'm up to date ...
thx again,
richard
OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com> writes:
> i _think_ i'm up to date ...
Maybe you didn't restart your beta4-or-older postmaster after updating?
SPI_restore_connection definitely exists in the beta5 sources ...
regards, tom lane
> Maybe you didn't restart your beta4-or-older postmaster after updating?
> SPI_restore_connection definitely exists in the beta5 sources ...
all ok now.
restarting wasn't doing the trick ... same errors. still able to
access/read/write to my db's but nada else.
but, looking in my logs i noted a slew of:
FATAL: database files are incompatible with server
DETAIL: The database cluster was initialized with CATALOG_VERSION_NO
200410111, but the server was compiled with CATALOG_VERSION_NO 200411041.
HINT: It looks like you need to initdb.
after re-initdb'ing and restarting, all's ok with 'createlang' ... inasmuch as
i get no error & no log entries ... for all langs.
i didna realize (and apparently missed in RTFM'ing) that initdb was necessary
from beta-to-beta ...
soooo, as usual, i created my own problem :S odd though that i was getting
fatal errors, but still able to launch the db ...
thanks for your patience & help!
cheers,
richard