// the find
timescale/timescaledb-tune
A tool for tuning TimescaleDB for better performance by adjusting settings to match your system's CPU and memory resources.
A CLI that reads your postgresql.conf and rewrites it with tuned values based on actual system memory and CPU count. Timescale-specific (sets timescaledb.max_background_workers, ensures shared_preload_libraries is correct) but most of the recommendations are solid general PostgreSQL tuning. Useful on any fresh TimescaleDB install where the defaults are still embarrassingly low.
Backup-before-write is done correctly — every run writes a timestamped copy to tmp before touching the real file, and --restore lets you pick from a numbered list. The --dry-run flag prints diffs without writing anything, which is the right default for automated pipelines. Recommendation math is well-tested: separate test files per setting category (wal_test.go, parallel_test.go, memory_test.go) with explicit expected values rather than just 'it ran'. The --quiet --yes combo makes it scriptable for Docker entrypoints or Ansible without fighting interactive prompts.
Conf file detection is heuristic-only — if your postgresql.conf is in a non-standard path, auto-detection silently falls back and you get an error rather than a sensible default guess. Profile support is almost vestigial: 'promscale' is the only non-default profile documented, and Promscale was sunset in 2023, so that option is effectively dead weight. No support for ALTER SYSTEM output — if you manage your Postgres config that way instead of editing postgresql.conf directly, this tool can't help you. The tuning formulas are baked in with no explanation of the reasoning, so if the recommendations don't fit your workload (e.g. you have many small concurrent connections vs. a few big queries), you have no guidance on what to change.