dynamic_library_path is not set in major version upgrade
Summary
dynamic_library_path
is not set during major version upgrade
Current Behaviour
A major version upgrade fails if an extensions that uses any installed shared library is used.
Steps to reproduce
- Create a cluster with
postgis
extension with lowest major version of postgres available - Restart the cluster
- Execute on the primary instance:
CREATE EXTENSION postgis;
- Update cluster postgres major versoin to latest available
- Create a major version upgrade dbops
Expected Behaviour
The cluster major version upgrade is performed without problems
Possible Solution
Set dynamic_library_path
for old and new postgres when calling pg_upgrade
Environment
- StackGres version: 1.0.0-alpha2
- Kubernetes version: ?
- Cloud provider or hardware configuration: ?
Relevant logs and/or screenshots
pg_upgrade_internal.log:-----------------------------------------------------------------
pg_upgrade_internal.log: pg_upgrade run on Mon May 24 12:53:51 2021
pg_upgrade_internal.log:-----------------------------------------------------------------
pg_upgrade_internal.log:
pg_upgrade_internal.log:Performing Consistency Checks
pg_upgrade_internal.log:-----------------------------
pg_upgrade_internal.log:Checking cluster versions ok
pg_upgrade_internal.log:Checking database user is the install user ok
pg_upgrade_internal.log:Checking database connection settings ok
pg_upgrade_internal.log:Checking for prepared transactions ok
pg_upgrade_internal.log:Checking for reg* data types in user tables ok
pg_upgrade_internal.log:Checking for contrib/isn with bigint-passing mismatch ok
pg_upgrade_internal.log:Checking for tables WITH OIDS ok
pg_upgrade_internal.log:Checking for invalid "sql_identifier" user columns ok
pg_upgrade_internal.log:Checking for presence of required libraries fatal
pg_upgrade_internal.log:Your installation references loadable libraries that are missing from the
pg_upgrade_internal.log:new installation. You can add these libraries to the new installation,
pg_upgrade_internal.log:or remove the functions using them from the old installation. A list of
pg_upgrade_internal.log:problem libraries is in the file:
pg_upgrade_internal.log: loadable_libraries.txt
pg_upgrade_internal.log:
loadable_libraries.txt:could not load library "$libdir/postgis-3": ERROR: could not load library "/usr/lib/postgresql/12.3/lib/postgis-3.so": libgeos_c.so.1: cannot open shared object file: No such file or directory
loadable_libraries.txt:Database: postgres