PostgreSQL Connection

Host
Database
User
This option determines whether or with what priority a secure TLS/SSL TCP/IP connection will be negotiated with the server.
This option determines how TLS/SSL certifications are configured. Selecting File system path will allow you to configure certificates by specifying paths to existing certificates on the local file system where Grafana is running. Be sure that the file is readable by the user executing the Grafana process.

Selecting Certificate content will allow you to configure certificates by specifying its content. The content will be stored encrypted in Grafana's database. When connecting to the database the certificates will be written as files to Grafana's configured data path on the local file system.
TLS/SSL Auth Details
TLS/SSL Root Certificate If the selected TLS/SSL mode requires a server root certificate, provide the path to the file here.
TLS/SSL Client Certificate To authenticate with an TLS/SSL client certificate, provide the path to the file here. Be sure that the file is readable by the user executing the grafana process.
TLS/SSL Client Key To authenticate with a client TLS/SSL certificate, provide the path to the corresponding key file here. Be sure that the file is only readable by the user executing the grafana process.
Connection limits
Max open The maximum number of open connections to the database. If Max idle connections is greater than 0 and the Max open connections is less than Max idle connections, then Max idle connections will be reduced to match the Max open connections limit. If set to 0, there is no limit on the number of open connections.
Max idle The maximum number of connections in the idle connection pool. If Max open connections is greater than 0 but less than the Max idle connections, then the Max idle connections will be reduced to match the Max open connections limit. If set to 0, no idle connections are retained.
Max lifetime The maximum amount of time in seconds a connection may be reused. If set to 0, connections are reused forever.

PostgreSQL details

Version This option controls what functions are available in the PostgreSQL query builder.
Min time interval A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example 1m if your data is written every minute.

TimescaleDB is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use time_bucket in the $__timeGroup macro and display TimescaleDB specific aggregate functions in the query builder.

User Permission

The database user should only be granted SELECT permissions on the specified database & tables you want to query. Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements like DELETE FROM user; and DROP TABLE user; would be executed. To protect against this we Highly recommmend you create a specific PostgreSQL user with restricted permissions.