Use the PostgreSQL connection workflow to add a PostgreSQL server to Mini DBA monitoring. PostgreSQL monitoring uses database roles, optional extensions, PostgreSQL log configuration, and optional host OS login for CPU, memory, drive, and disk I/O metrics.
In Servers, select Add Server and choose PostgreSQL.
| Field | What to enter |
|---|---|
| Type | PostgreSQL |
| Instance / Host | PostgreSQL host name or address |
| Username | PostgreSQL login used for monitoring |
| Password | Password for the monitoring login |
The Mini DBA Engine must be able to reach PostgreSQL, normally on port 5432 unless your server uses a different port.
With the recommended PostgreSQL roles and extensions, Mini DBA can collect:
pg_stat_statements.pg_buffercache.file_fdw are configured.The PostgreSQL permissions modal checks:
Run this as a PostgreSQL administrator. Change the password first.
CREATE USER minidba_monitor WITH PASSWORD 'UseASecretPasswordHere';
GRANT pg_monitor TO minidba_monitor;
GRANT pg_read_all_settings TO minidba_monitor;
GRANT pg_read_all_stats TO minidba_monitor;
GRANT pg_stat_scan_tables TO minidba_monitor;
GRANT pg_read_server_files TO minidba_monitor;
GRANT pg_signal_backend TO minidba_monitor;
GRANT pg_read_all_data TO minidba_monitor;
If your security policy does not allow pg_read_all_data, grant schema or table-specific SELECT permissions instead for the databases Mini DBA should inspect.
Run these in each database where the extension should be available:
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
CREATE EXTENSION IF NOT EXISTS pg_buffercache;
CREATE EXTENSION IF NOT EXISTS file_fdw;
For pg_stat_statements, PostgreSQL normally also requires this in postgresql.conf:
shared_preload_libraries = 'pg_stat_statements'
Reload or restart PostgreSQL as required by your PostgreSQL version and hosting model.
For richer log, slow query, and deadlock visibility, configure PostgreSQL logging. A typical starting point is:
logging_collector = 'on'
log_destination = 'stderr,csvlog'
Apply the change with a service reload, or run:
SELECT pg_reload_conf();
If you use file_fdw for log access, create a foreign data wrapper server:
CREATE SERVER log_file_server FOREIGN DATA WRAPPER file_fdw;
After adding PostgreSQL, open the PostgreSQL server and open the PostgreSQL Connectivity Permissions modal. Select Refresh to probe roles, extensions, and host OS status.
Use the modal after:
PostgreSQL host OS login is configured from the PostgreSQL permissions modal after the server is added. On Linux, use SSH with password or private key authentication; Mini DBA uses host commands such as top, df, and iostat. On Windows, use an account with suitable WMI and performance counter access where the PostgreSQL host supports Windows host monitoring.
Host OS login can add:
For detailed setup, see Host OS Login.
pg_hba.conf, SSL requirements, username, and password.pg_stat_statements and confirm it is loaded.pg_buffercache.logging_collector, log destination, file_fdw, and server-side file access.top, df, and iostat are available.pg_hba.conf, SSL, timeout, extension, and data-access errors captured by the engine.No. Superuser can make testing easier, but routine monitoring should use narrower roles such as pg_monitor, pg_read_all_settings, pg_read_all_stats, and related read roles.
PostgreSQL exposes some important performance information through extensions. pg_stat_statements is especially important for query monitoring, and pg_buffercache improves memory and cache analysis.
No. PostgreSQL roles give database-level visibility. Host OS login adds operating system metrics such as CPU, memory, file system usage, and disk I/O.