You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "1yuv (via GitHub)" <gi...@apache.org> on 2025/10/16 22:26:54 UTC
[D] Prevent superset from trying to catalog all other databases [superset]
GitHub user 1yuv created a discussion: Prevent superset from trying to catalog all other databases
Why does superset try to catalog all other databases on postgres database connection when I connect postgres? My user doesn't have access to any other databases, but only to specific database. However, superset appears to try to connect to all databases after querying pg_database.
GitHub link: https://github.com/apache/superset/discussions/35690
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Prevent superset from trying to catalog all other databases [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Prevent superset from trying to catalog all other databases
<!-- Answer -->
Superset queries all Postgres databases because its engine spec runs `SELECT datname FROM pg_database WHERE datistemplate = false;` to list all non-template databases as catalogs, regardless of your user's permissions. This is part of Superset's catalog and permission model, which was standardized to support cross-catalog queries and enforce permissions across databasesāeven though Postgres itself doesn't support cross-database queries using the `database.schema.table` pattern [source](https://github.com/apache/superset/issues/31406#issuecomment-3127652281).
To prevent Superset from cataloging all databases, you can disable both the `allow_multi_catalog` feature flag and the `supports_cross_catalog_queries` attribute for Postgres. The recommended workaround is to set `supports_cross_catalog_queries = False` for the Postgres engine in your `superset_config.py`, or use a `FLASK_APP_MUTATOR` function to do this at startup [source](https://github.com/apache/superset/issues/35116#issuecomment-3285390554). When both are disabled, Superset should only catalog the default database you connect to.
There isn't official user-facing documentation for this yet, but this approach is discussed and recommended by maintainers [source](https://github.com/apache/superset/issues/32993#issuecomment-2776586602).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/10d37d11-1516-4031-a306-ad246213add3?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35690)
GitHub link: https://github.com/apache/superset/discussions/35690#discussioncomment-14703727
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Prevent superset from trying to catalog all other databases [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Prevent superset from trying to catalog all other databases
<!-- Answer -->
Superset queries all Postgres databases because its engine spec runs `SELECT datname FROM pg_database WHERE datistemplate = false;` to list all non-template databases as catalogs, regardless of your user's permissions. This is part of Superset's catalog and permission model, which was standardized to support cross-catalog queries and enforce permissions across databasesāeven though Postgres itself doesn't support cross-database queries using the `database.schema.table` pattern [source](https://github.com/apache/superset/issues/31406#issuecomment-3127652281).
To prevent Superset from cataloging all databases, you can disable both the `allow_multi_catalog` feature flag and the `supports_cross_catalog_queries` attribute for Postgres. The recommended workaround is to set `supports_cross_catalog_queries = False` for the Postgres engine in your `superset_config.py`, or use a `FLASK_APP_MUTATOR` function to do this at startup [source](https://github.com/apache/superset/issues/35116#issuecomment-3285390554). When both are disabled, Superset should only catalog the default database you connect to.
There isn't official user-facing documentation for this yet, but this approach is discussed and recommended by maintainers [source](https://github.com/apache/superset/issues/32993#issuecomment-2776586602).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=10d37d11-1516-4031-a306-ad246213add3) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35690#discussioncomment-14703727
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org