-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
Milestone
@Envek
Description
Hi everyone!
I'm trying to automate pg_pathman upgrading with Puppet.
So, I'm trying to do so:
- Clone/checkout required version from git to temp repo
- If revision in repo changed, execute
make install USE_PGXS=1
- If build succeeded, restart PostgreSQL
- Check installed pg_pathman version in target database via
SELECT * FROM pg_extension WHERE extname = 'pg_pathman' AND extversion = '1.3';
- If previous query returned no tuples (target version not installed), upgrade it via
ALTER EXTENSION pg_pathman UPDATE TO "1.3"; SET pg_pathman.enable = t
The problem is that after upgrade from 1.2 to 1.3 if run any command in psql it will fail with following error:
ОШИБКА: pg_pathman's Pl/PgSQL frontend is incompatible with its shared library
DETAIL: consider performing an update procedure
HINT: pg_pathman will be disabled to allow you to resolve this issue
And as official Puppet's PostgreSQL module uses psql
for executing commands, it can't even upgrade pg_pathman as any command passed to psql will fail immediately, and manual intervention is required to finish upgrade (because I'm only human after all and able to guess to execute command one more time):
psql (9.5.5)
Type "help" for help.
smp=# SELECT * FROM pg_extension WHERE extname = 'pg_pathman' AND extversion = '1.3';
ОШИБКА: pg_pathman's Pl/PgSQL frontend is incompatible with its shared library
DETAIL: consider performing an update procedure
HINT: pg_pathman will be disabled to allow you to resolve this issue
smp=# SELECT * FROM pg_extension WHERE extname = 'pg_pathman' AND extversion = '1.3';
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
---------+----------+--------------+----------------+------------+-----------+--------------
psql (9.5.5)
Type "help" for help.
smp=# ALTER EXTENSION pg_pathman UPDATE TO "1.3";
ОШИБКА: pg_pathman's Pl/PgSQL frontend is incompatible with its shared library
DETAIL: consider performing an update procedure
HINT: pg_pathman will be disabled to allow you to resolve this issue
smp=# ALTER EXTENSION pg_pathman UPDATE TO "1.3";
ПРЕДУПРЕЖДЕНИЕ: Don't forget to execute "SET pg_pathman.enable = t" to activate pg_pathman
ALTER EXTENSION
smp=# SET pg_pathman.enable = t;
ЗАМЕЧАНИЕ: RuntimeAppend, RuntimeMergeAppend and PartitionFilter nodes and some other options have been enabled
SET
smp=# SELECT * FROM pg_extension WHERE extname = 'pg_pathman' AND extversion = '1.3';
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
------------+----------+--------------+----------------+------------+-----------------------+--------------
pg_pathman | 16384 | 116179045 | f | 1.3 | {116179175,116179185} | {"",""}
Can you please change error to some kind of warning that will be visible to humans, but will not prevent programs from executing statements?
Thank you in advance