src/integration/admin.integration.test.ts:518-583 exercises the _warnings populated path by REVOKE EXECUTE ON FUNCTION pg_catalog.pg_current_wal_lsn() FROM PUBLIC, then re-granting in cleanup. The structure is correct (captures testError, runs cleanup unconditionally), but a hard process crash between REVOKE and GRANT leaves the cluster broken for every non-superuser session until manually re-granted.
Options:
- Replace with a fixture-owned function whose grants can be flipped without touching pg_catalog. The handler would need a way to call this fixture function instead of
pg_current_wal_lsn(), which probably isn't clean.
- Write a different
_warnings-shape test path that doesn't depend on which function is being permission-gated -- e.g. swap to a role that lacks REPLICATION attribute and exercise the pg_replication_slots permission gate instead (already permission-gated on some managed providers).
- Gate the REVOKE test behind a
POSTGRES_MCP_DESTRUCTIVE_TESTS=1 env flag so it only runs on disposable CI clusters.
src/integration/admin.integration.test.ts:518-583exercises the_warningspopulated path byREVOKE EXECUTE ON FUNCTION pg_catalog.pg_current_wal_lsn() FROM PUBLIC, then re-granting in cleanup. The structure is correct (captures testError, runs cleanup unconditionally), but a hard process crash between REVOKE and GRANT leaves the cluster broken for every non-superuser session until manually re-granted.Options:
pg_current_wal_lsn(), which probably isn't clean._warnings-shape test path that doesn't depend on which function is being permission-gated -- e.g. swap to a role that lacks REPLICATION attribute and exercise thepg_replication_slotspermission gate instead (already permission-gated on some managed providers).POSTGRES_MCP_DESTRUCTIVE_TESTS=1env flag so it only runs on disposable CI clusters.