pg_pathman icon indicating copy to clipboard operation
pg_pathman copied to clipboard

pg_pathman.so: undefined symbol

Open jackerzhou opened this issue 3 years ago • 4 comments

Problem description

Explain your problem here (it's always better to provide reproduction steps) ...

could not load library "/usr/local/pgsql1306/lib/pg_pathman.so": /usr/local/pgsql1306/lib/pg_pathman.so: undefined symbol: errstart_cold

Environment

select version();

PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit (1 row)

pg_pathman-1.5.12

jackerzhou avatar Sep 19 '22 02:09 jackerzhou

Hi, errstart_cold was introduced in pg14 but you're creating the extension for pg13. Do you have pg14 (or more recent) installed? One usual issue is getting a different pg_config. Could you check that sudo pg_config returns the correct postgres version?

kovdb75 avatar Sep 21 '22 22:09 kovdb75

Hi, I have the same question, did you solve it? I install the pg_bigm to create index. It seems that someone install the PG14, but i use ' dpkg -l | grep postgres sudo apt --purge remove [version-name] ' to remove it . when i 'sudo pg_config', it seems PG13,but when i create extension.it says 'undefined symbol: errstart_cold'

k1271697262 avatar Sep 23 '22 06:09 k1271697262

Hi!

Unfortunately I can't reproduce this problem. I created directory "builds" and then:

  1. Commands inside directory "builds":
git clone git://git.postgresql.org/git/postgresql.git
git clone https://github.com/postgrespro/pg_pathman
  1. Commands inside "postgresql" directory:
git checkout REL_13_STABLE
./configure --enable-debug --enable-tap-tests --enable-cassert --with-icu --prefix `pwd`/install >/dev/null && make -j4 -s && make -j4 -C contrib -s && make install -s && make install -C contrib -s
  1. Command inside "pg_pathman" directory:
PATH=../postgresql/install/bin:$PATH make install USE_PGXS=1 
  1. Commands inside "postgresql" directory (database creation in "builds/postgresql/data-13" directory):
./install/bin/pg_ctl initdb -w -D data-13 --options="-A trust -D data-13 -E utf-8 --no-locale -N -n"
./install/bin/pg_ctl -D data-13 start
./install/bin/createdb test
./install/bin/pg_ctl -D data-13 stop
  1. Add "shared_preload_libraries='pg_pathman'" into end of file /postgresql/data-13/postgresql.conf and start server again (inside "postgresql" directory):
./install/bin/pg_ctl -D data-13 start
./install/bin/psql test
  1. And execute queries in psql:
CREATE SCHEMA pathman;
GRANT USAGE ON SCHEMA pathman TO PUBLIC;
CREATE EXTENSION pg_pathman WITH SCHEMA pathman;

And I don't see any error after last query ... Could you repeat the same steps?

kovdb75 avatar Sep 23 '22 08:09 kovdb75

FTR it's probably the same issue as https://github.com/HypoPG/hypopg/issues/76, so using the appropriate pg_config at build time should also solve this issue.

rjuju avatar Sep 23 '22 08:09 rjuju