Exclude/Hide Databases via Environment Variable or Bookmark
Author: helldrumCreated Dec 16, 2025Updated Dec 16, 2025
Hello pgweb team !
I would like to propose a new feature for pgweb: the ability to exclude or hide specific databases from being displayed, either via an environment variable or through a bookmark configuration.
Currently, there is no straightforward mechanism to control database visibility directly from pgweb's configuration (or I don't find it in the documentation). This feature would be highly beneficial in environments where pgweb is deployed centrally and where there is a need to:
- Enhance security: Restrict the visibility of sensitive databases for certain users or environments.
- Simplify the user interface: Hide internal or temporary databases that are not relevant to the end-user.
- Improve deployment management: Allow dynamic and simplified configuration of database visibility without modifying the application itself. Proposed Implementation:
- Via an Environment Variable:
- Add an environment variable such as
PGWEB_EXCLUDE_DATABASES(orPGWEB_IGNORE_DATABASES) that would accept a list of database names (separated by commas or another delimiter) to be hidden. - Example:
PGWEB_EXCLUDE_DATABASES=template0,template1,postgres_internal
- Via Bookmark Configuration (.toml):
- Add a new key to the
bookmark.tomlfile, for example,exclude_databases = ["postgres", "cloudsqladmin"]. This feature would offer valuable flexibility for pgweb administration and usage in various contexts. Thank you for considering this suggestion.
Regards, Helldrum
Source: sosedoff/pgweb