Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version validation prevents automation tools from executing extension update statement #95

Closed
@Envek

Description

Hi everyone!

I'm trying to automate pg_pathman upgrading with Puppet.

So, I'm trying to do so:

  1. Clone/checkout required version from git to temp repo
  2. If revision in repo changed, execute make install USE_PGXS=1
  3. If build succeeded, restart PostgreSQL
  4. Check installed pg_pathman version in target database via SELECT * FROM pg_extension WHERE extname = 'pg_pathman' AND extversion = '1.3';
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /