Repository navigation
ERROR: pg_duckdb needs to be loaded via shared_preload_libraries HINT: Add pg_duckdb to shared_preload_libraries. #368
Replies: 10 comments 1 reply
|
Some ideas on troubleshooting:
|
|
It sounds like further below in the config you have then already set |
|
Hmm. I get your point but seriously i only have one entry (in the screenshot).. I also checked in PG with SHOW config_file; It gives me "/etc/postgresql/15/main/postgresql.conf" . Can it load from somewhere else as well? |
|
There is generally also |
|
Thought you'd never ask ;) |
|
1、shared_preload_libraries = 'pg_duckdb' |
Without the second step, run the following SQL"SELECT * FROM pg_available_extensions WHERE name = 'pg_duckdb';" You can still get information about "pg_duckdb". So you need to restart PG. |
-- shared_preload_libraries = 'pg_duckdb'
[postgres@halo-centos8 16]$ psql
psql (16.4)
Type "help" for help.
postgres=# SELECT * FROM pg_available_extensions WHERE name = 'pg_duckdb';
name | default_version | installed_version | comment
-----------+-----------------+-------------------+-----------------------------
pg_duckdb | 0.1.0 | | DuckDB Embedded in Postgres
(1 row)
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
----------+---------+------------+------------------------------------------
pg_jieba | 1.1.1 | public | a parser for full-text search of Chinese
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)
postgres=# create extension pg_duckdb;
...
ERROR: pg_duckdb needs to be loaded via shared_preload_libraries
HINT: Add pg_duckdb to shared_preload_libraries.
postgres=# \q
[postgres@halo-centos8 16]$ pg_ctl restart
waiting for server to shut down....2024-10-29 22:36:23.401 CST [68812] LOG: 00000: received fast shutdown request
...
done
server stopped
waiting for server to start....2024-10-29 22:36:23.524 CST [68849] LOG: 00000: starting PostgreSQL 16.4 on x86_64-pc-linux-gnu, ...
done
server started
[postgres@halo-centos8 16]$ psql
psql (16.4)
Type "help" for help.
postgres=# create extension pg_duckdb;
CREATE EXTENSION
postgres=# |
|
Closing this, as it was almost certainly a user error somewhere. |

Uh oh!
There was an error while loading. Please reload this page.
What happens?
Hi everyone
Error somes when trying to execute CREATE EXTENSION pg_duckdb; .
Have PG15.
Config file edited:
shared_preload_libraries = 'pg_duckdb'
pg_duck.so is in the shared_library folder
When executing SELECT * FROM pg_available_extensions WHERE name = 'pg_duckdb';
I get 'pg_duckdb "0.1.0" [null] "DuckDB Embedded in Postgres"'
So PG knows about it.
How to troubleshoot?
/Henrik
To Reproduce
CREATE EXTENSION pg_duckdb;
OS:
Ubuntu 22.04
pg_duckdb Version:
0.1.0
Postgres Version:
15
Hardware:
No response
Full Name:
Henrik Pedersen
Affiliation:
Scandinavian Highlands
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?
All reactions