Server API Geovisio (geovisio/api:2.6.0) demande un droit trop élevé : session_replication_role pour le déploiement

Bonjour,

En essayant de déployer la version geovisio/api:2.6.0, la commande ./docker-entrypoint.sh db-upgrade me sort l’erreur suivante :

2024-09-05 09:39:11,966 [MainThread][INFO] yoyo.migrations: Applying 20240416_02_A5KzC-fill-pictures-stats-on-sequences
2024-09-05 09:39:11,990 [MainThread][INFO] yoyo.migrations:  - applying step 0
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/geovisio/.local/lib/python3.9/site-packages/flask/__main__.py", line 3, in <module>
    main()
  File "/home/geovisio/.local/lib/python3.9/site-packages/flask/cli.py", line 1064, in main
    cli.main()
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/flask/cli.py", line 358, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/flask/cli.py", line 358, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/home/geovisio/.local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/geovisio/geovisio/admin_cli/db.py", line 15, in upgrade
    db_migrations.update_db_schema(current_app.config["DB_URL"], force=True)
  File "/opt/geovisio/geovisio/db_migrations.py", line 37, in update_db_schema
    backend.apply_migrations(migrationToApply)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/backends/base.py", line 449, in apply_migrations
    self.apply_migrations_only(migrations, force=force)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/backends/base.py", line 461, in apply_migrations_only
    self.apply_one(m, force=force)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/backends/base.py", line 507, in apply_one
    migration.process_steps(migration_backend, "apply", force=force)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/migrations.py", line 271, in process_steps
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/migrations.py", line 256, in process_steps
    getattr(step, direction)(backend, force)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/migrations.py", line 314, in apply
    getattr(self.step, direction)(backend, force)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/migrations.py", line 408, in apply
    self._execute(cursor, self._apply)
  File "/home/geovisio/.local/lib/python3.9/site-packages/yoyo/migrations.py", line 378, in _execute
    cursor.execute(stmt)
  File "/opt/geovisio/geovisio/utils/sentry.py", line 70, in _inner
    res = f(self, query, params, prepare=prepare, binary=binary)
  File "/home/geovisio/.local/lib/python3.9/site-packages/psycopg/cursor.py", line 732, in execute
    raise ex.with_traceback(None)
psycopg.errors.InsufficientPrivilege: permission denied to set parameter "session_replication_role"

Pour pouvoir utiliser session_replication_role , il faut avoir des droits TRES élevés qui ne sont pas disponible sur des bases managées.

Pour information, j’ai le même problème en 2.5.
Je suis obligé de passer en version 2.4 pour ne pas avoir de blocage.

comment peut on régler le problème ?

Merci