Closed Pravin-Pratiti closed 5 years ago
The erro message is testdb=# CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; FATAL: extension "timescaledb" must be preloaded HINT: Please preload the timescaledb library via shared_preload_libraries. This can be done by editing the config file at: /data/patroni2/postgresql.conf and adding 'timescaledb' to the list in the shared_preload_libraries config.
shared_preload_libraries = 'timescaledb'
Another way to do this, if not preloading other libraries, is with the command: echo "shared_preload_libraries = 'timescaledb'" >> /data/patroni2/postgresql.conf (Will require a database restart.) If you REALLY know what you are doing and would like to load the library without preloading, you can disable this check with: SET timescaledb.allow_install_without_preload = 'on'; server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Succeeded.
The issue was due to shared_preload_libraries
needs to be set in Patroni configuration for PostgreSQL.
thanks now it is working
@Pravin-kumbhar how you fixed it could you please explain?
If I manually add to postgresql.conf, on restarting patroni, it gets overwritten .
@shreeramk Im running into the same scenario.
The issue was due to
shared_preload_libraries
needs to be set in Patroni configuration for PostgreSQL.
How can Add shared_preload_libraries to postgresql
Add this in postgresql section (NOT DCS !)
Doc is here
postgresql:
listen: 192.168.0.15432
connect_address: 192.168.0.1:5432
data_dir: /opt/postgres/16/data/
bin_dir: /usr/pgsql-16/bin
pgpass: /tmp/pgpass0
authentication:
replication:
username: rep_user
password: postgres
superuser:
username: postgres
password: postgres
rewind:
username: rep_user
password: postgres
parameters:
shared_preload_libraries: 'citus,pg_cron' # ADD EXTENSIONS HERE !!!
unix_socket_directories: '/var/run/postgresql, /tmp'
external_pid_file: '/var/run/postgresql/citus-patroni.pid'
logging_collector: 'on'
log_directory: '/opt/postgres/16/log'
log_filename: 'citus-patroni.log'
Relevant system information:
postgres --version
): [e.g. 10.5, 9.6.10]\dx
inpsql
): [e.g. 1.0.0]Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Actual behavior A clear and concise description of what actually happened.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.