JDBC Driver Configuration

The Insights server contains a PostgresSQL-compatible JDBC driver by default. You can access the database using a PostgresSQL JDBC URL.

The database name in the URL is mapped to the context name in Insights. For example, to connect to the "bikes" context, use the following JDBC URL:

jdbc:postgresql://localhost:5432/bikes

Parameter

Default

Description

insights.jdbc.enabled

true

Enable or disable the JDBC driver.

insights.jdbc.port

5432

TCP port to listen on for PostgreSQL wire protocol connections.

insights.jdbc.bind-address

null

Bind address for the server. If null, binds to all interfaces (0.0.0.0).

insights.jdbc.max-connections

100

Maximum number of concurrent client connections.

insights.jdbc.connection-timeout-ms

30000

Connection timeout in milliseconds. Idle connections exceeding this timeout will be closed.

insights.jdbc.query-timeout-ms

120000

Maximum query execution time in milliseconds before timing out.

insights.jdbc.buffer-size

8192

Buffer size for socket reads and writes.

insights.jdbc.require-authentication

true

Whether to require authentication for PgWire connections. When false, connections are accepted without password verification.

insights.jdbc.ssl-enabled

false

Enable SSL/TLS for PgWire connections. When true, server responds 'S' to SSL requests and performs TLS handshake. When false, server responds 'N' (no SSL support).

insights.jdbc.ssl-cert-chain-file

null

Path to certificate chain file (PEM format) for SSL/TLS.

insights.jdbc.ssl-private-key-file

null

Path to private key file (PEM format, PKCS8) for SSL/TLS.

insights.jdbc.max-string-size

10485760

Maximum size in bytes for query strings and C-style strings read from the wire. Protects against Out-of-Memory attacks from malicious clients sending oversize strings. Default is 10MB.

insights.jdbc.max-parameter-size

104857600

Maximum total size in bytes for all parameter values in a single Bind message. Protects against Out-of-Memory attacks from malicious clients sending oversize parameters. Default is 100MB.

insights.jdbc.max-prepared-statements

1000

Maximum number of prepared statements cached per connection. When exceeded, the least recently used statements are evicted. Protects against memory exhaustion from clients creating unlimited statements. Default is 1000.

insights.jdbc.max-portals

100

Maximum number of portals (bound statements) cached per connection. When exceeded, the least recently used portals are evicted. Protects against memory exhaustion from clients creating unlimited portals. Default is 100.

insights.jdbc.portal-timeout-ms

300000

Timeout in milliseconds for suspended portals (portals with partial results). Suspended portals that haven’t been accessed within this timeout are closed to prevent resource leaks from abandoned streaming queries. Default is 5 minutes (300000ms).