perf(postgres): add configurable JDBC and JOOQ tuning settings#522
perf(postgres): add configurable JDBC and JOOQ tuning settings#522
Conversation
Add configurable settings for PostgreSQL JDBC driver and JOOQ with performance-optimized defaults. Combined these reduce PostgreSQL/JOOQ CPU overhead by ~18%. JDBC driver settings (inkless.control.plane.jdbc.*): - prepare.threshold (default: 5) - executions before server-prepared - prepared.statement.cache.queries (default: 256) - cached queries - prepared.statement.cache.size.mib (default: 5) - cache size limit - default.row.fetch.size (default: 100) - batch row fetching - tcp.keep.alive (default: true) - connection keepalive - binary.transfer (default: true) - binary serialization JOOQ settings (inkless.control.plane.jooq.*): - execute.logging (default: false) - query logging - render.catalog (default: false) - catalog prefix in SQL - render.schema (default: false) - schema prefix in SQL - reflection.caching (default: true) - reflection caching - cache.record.mappers (default: true) - mapper caching - in.list.padding (default: true) - IN list padding Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c62ae3c to
805cc83
Compare
There was a problem hiding this comment.
Pull request overview
Adds configurable tuning knobs for PostgreSQL JDBC and jOOQ in the Inkless Postgres control plane, with performance-oriented defaults, and documents the new settings.
Changes:
- Add new
jdbc.*andjooq.*configuration keys toPostgresConnectionConfig(including read/write override support via existing prefixes). - Apply jOOQ
Settingswhen creatingDSLContextinstances, and add PostgreSQL JDBC driver tuning properties to the HikariDataSource. - Update generated configuration documentation (
docs/inkless/configs.rst) to include the new settings under control-plane, read, and write sections.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| storage/inkless/src/main/java/io/aiven/inkless/control_plane/postgres/PostgresControlPlane.java | Applies JDBC driver properties to Hikari, and introduces jOOQ Settings wiring into DSLContext creation. |
| storage/inkless/src/main/java/io/aiven/inkless/control_plane/postgres/PostgresConnectionConfig.java | Defines new JDBC + jOOQ tuning config keys and getters with defaults/ranges. |
| docs/inkless/configs.rst | Documents the new config keys under the relevant prefixes (control plane + read/write overrides). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
storage/inkless/src/main/java/io/aiven/inkless/control_plane/postgres/PostgresControlPlane.java
Outdated
Show resolved
Hide resolved
storage/inkless/src/main/java/io/aiven/inkless/control_plane/postgres/PostgresControlPlane.java
Outdated
Show resolved
Hide resolved
- Fix log message typo: "No separate write configuration" -> "No separate read configuration" - Build separate jooqSettings for write/read contexts to respect per-context overrides Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
.../inkless/src/main/java/io/aiven/inkless/control_plane/postgres/PostgresConnectionConfig.java
Show resolved
Hide resolved
Add tests to verify: - JDBC tuning config defaults (prepareThreshold, cache sizes, fetch size) - JOOQ settings defaults (execute logging, render catalog/schema, caching) - Override behavior for both direct and read/write-prefixed configs This locks in the intended performance tuning defaults so future refactors don't silently change behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
JDBC driver settings (
inkless.control.plane.jdbc.*):prepare.thresholdprepared.statement.cache.queriesprepared.statement.cache.size.mibdefault.row.fetch.sizetcp.keep.alivebinary.transferJOOQ settings (
inkless.control.plane.jooq.*):execute.loggingrender.catalogrender.schemareflection.cachingcache.record.mappersin.list.paddingBold values indicate where our defaults differ from library defaults.
Test plan
🤖 Generated with Claude Code