Autodesk / pgbelt

Pgbelt is a CLI tool used to manage Postgres data migrations from beginning to end, for a single database or a fleet, leveraging pglogical replication.
Apache License 2.0
18 stars 5 forks source link

Some databases can't DROP EXTENSION IF EXISTS pglogical -- hangs indefinitely. #84

Open vjeeva opened 2 years ago

vjeeva commented 2 years ago

Relates to https://github.com/2ndQuadrant/pglogical/issues/211

We had an internal database hang when running DROP EXTENSION IF EXISTS pglogical, after running the fix for #83. We were doing this to unblock a migration on an internal database -- alembic was connecting to the database using the role that owned all the tables in the schema. Still, alembic was having permission issues with the pglogical schema.

This database doesn't need belt or pglogical right now. We tried dropping the schema, but it said to drop the extension. We try dropping the extension, but it hangs.

To unblock their migration with their role, I had to run a GRANT USAGE ON SCHEMA pglogical TO <that_role>. That may have thrown an extra wrench in dropping the extension, but we should try and figure this bug out.

Might also be related to https://github.com/2ndQuadrant/pglogical/issues/361

vjeeva commented 11 months ago

278 will fix the USAGE issue. Extension dropping still is being investigated, see https://github.com/2ndQuadrant/pglogical/issues/422.