The metadata extraction process for PostgreSQL is always read-only. It does not modify data, but it requires access to certain system tables in order to capture advanced metadata (such as the SQL of views or stored procedures) that are not exposed through the JDBC driver.
-
Required permissions:
A user with read-only access to PostgreSQL system tables is required.
There is no single minimal permission set, as requirements vary across PostgreSQL versions and configurations.
- To extract additional properties (such as creation and modification times), grant EXECUTE permission on the system function
pg_stat_file:GRANT EXECUTE ON FUNCTION pg_stat_file(text) TO <metadata_only_user>;
-
Recommended approach:
Initial validation
Test metadata extraction using a full Sys Admin user (with all permissions, similar to the account used to create and maintain the database).
This ensures the process works correctly for the specific PostgreSQL environment.
Privilege reduction
Once confirmed, the DBA may create a dedicated read-only user with the minimal set of permissions that still allow metadata extraction to succeed.