For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/ddsql_reference/data_directory/dd/dd.postgres_logical_databases.dataset.md. A documentation index is available at /llms.txt.

PostgreSQL Logical Databases

The PostgreSQL Logical Databases table provides metadata about logical databases discovered in PostgreSQL instances. Each row represents a logical database and includes information such as database name, encoding, owner, and a join key to navigate up the hierarchy to the database instance. This table enables you to inventory logical databases, analyze database ownership, and walk the hierarchy (logical database to database instance). The whole hierarchy is postgres_tables → postgres_schemas → postgres_logical_databases → database_instances (4 tables).

dd.postgres_logical_databases

Fields

TitleIDTypeData TypeDescription
Key_keycorestringUnique identifier for the PostgreSQL logical database record.
Database Namedatabase_namecorestringName of the logical database.
DescriptiondescriptioncorestringDescription of the logical database.
Display Namedisplay_namecorestringHuman-readable display name for the logical database.
EncodingencodingcorestringCharacter encoding of the logical database.
IDidcorestringInternal identifier for the logical database.
OwnerownercorestringOwner of the logical database.
Database Instance Keydatabase_instance_keycorestringUsed to join this logical database to dd.database_instances to get instance details and walk the hierarchy (logical database to database instance).