Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_pathman.so: undefined symbol #253

Open
jackerzhou opened this issue Sep 19, 2022 · 4 comments
Open

pg_pathman.so: undefined symbol #253

jackerzhou opened this issue Sep 19, 2022 · 4 comments

Comments

@jackerzhou
Copy link

jackerzhou commented Sep 19, 2022

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

@kovdb75
Copy link
Collaborator

kovdb75 commented Sep 21, 2022

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?

@k1271697262
Copy link

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'

@kovdb75
Copy link
Collaborator

kovdb75 commented Sep 23, 2022

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?

@rjuju
Copy link
Contributor

rjuju commented Sep 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants