PostgreSQL performance tuning with Human-in-the-loop: Precision tuning with total control and insight

AI proposes — DBAs approve

dbtune
DBtune ·
PostgreSQL performance tuning with Human-in-the-loop: Precision tuning with total control and insight

PostgreSQL performance tuning in production often stalls because teams face a difficult choice: move at the speed of automation or maintain the rigorous manual review required for quality and safety.

In 2025, the industry reached a turning point. As highlighted in the recent MMC State of Agentic AI report, the gold standard for enterprise AI is no longer just "unfettered autonomy." Instead, successful deployments are moving toward a collaborative assistant approach, where the goal is to augment human expertise rather than replace it. The report notes that while AI agents are technically capable of high levels of autonomy, most practitioners (especially in high-stakes environments) prefer Human-in-the-loop (HITL) workflows to build trust and ensure reliability. Interested to learn more? Book a demo.

At DBtune, we’ve been listening closely to your feedback. We know that for many of you, production environments are sacred. You need the speed of AI-driven PostgreSQL performance tuning , but you also need the safety and control of a highly experienced human gatekeeper. After all, at the end of the day, the database administrator will be accountable.

Today, we are thrilled to announce the launch of Human-in-the-loop tuning. This update transforms our autonomous AI pilot into a high-powered AI assistant, putting the final "Go/No-go" decision exactly where it belongs: in the user's hands.

Workflow enabling agentic precision tuning with human-in-the-loop

The MMC report found that 60% of agentic AI startups struggle with workflow integration and the human-agent interface. We’ve solved this by building a bridge between our optimizer’s suggestions and human governance. HITL is a game-changer for:

  • Production governance: Maintain absolute control over every change applied to mission-critical systems.
  • Compliance and auditing: Ideal for environments where DevOps and Database teams must review and sign off on configuration changes to satisfy regulatory requirements.
  • Safety and reliability: Prevent unintended changes during critical periods or "blackout" windows.
  • Trust and verification: As highlighted by MMC and many of our users, being able to easily review AI outputs is critical to enterprise adoption. HITL provides that transparency. Learn more and try it out.

PostgreSQL tuning: High stakes in production

Before we explore the new workflow, it’s vital to understand why PostgreSQL performance tuning could benefit from human oversight.

What is PostgreSQL performance tuning?
Tuning adjusts database server parameters—like memory allocation and the number of parallel workers—to align the PostgreSQL engine with your specific workload. PostgreSQL defaults are rarely optimized for high-traffic production environments.

What typically changes?
PostgreSQL optimization usually focuses on resource-heavy settings such as:

  • work_mem: The limit for complex sort and hash operations.
  • max_wal_size: The frequency of database checkpoints.
  • autovacuum: The intensity of background maintenance.

Learn about DBtune’s multi-dimensional tuning space.

Why production governance matters

While autonomous tuning is the fastest path to performance, high-stakes environments often require oversight that goes beyond technical optimization. We introduced Human-in-the-loop to bridge the gap between AI speed and enterprise governance.

In many organizations, PostgreSQL performance tuning is governed by strict operational policies:

  • Change management: Ensuring every modification has a clear audit trail for compliance.
  • Strategic timing: Holding valid optimizations for specific maintenance windows or low-traffic periods.
  • Team collaboration: Facilitating necessary sign-offs between DevOps and Database teams before deployment.

With the user in the optimization loop, the user remains the final orchestrator. By providing a manual "Go/No-go" gate, DBtune allows the user to leverage the full analytical power of the optimizer while ensuring every change aligns perfectly with the team's specific schedules and safety standards.

Inside the feature: Human-in-the-loop for PostgreSQL performance tuning

We’ve integrated HITL directly into the DBtune workflow to ensure that "manual review" doesn't mean slow.

A diagram showing DBtune's Human-in-the-loop workflow.

1. Simple activation

You can enable this feature at the database instance level. Simply navigate to the Advanced settings of the tuning session, and toggle Human-in-the-loop to “Enabled”. Once active, all future PostgreSQL performance tuning actions for that database instance will require manual approval.

2. The review queue

Whenever our optimizer identifies a new, potentially high-performance configuration, it won’t deploy it immediately. Instead, a banner will appear in your tuning summary panel indicating a configuration is awaiting review.

3. Deep-dive comparison

When you click "Review configuration," a detailed dialog opens. To ensure a seamless review, DBtune highlights values that differ from your baseline in blue. You can see a side-by-side breakdown of the Baseline configuration, the Best configuration found so far.

For a step-by-step walkthrough on how to configure these settings, check out the Human-in-the-loop documentation or start your first tuning session here.

A screenshot of the 'Review configuration' view in the DBtune platform.

The "Human-in-the-loop" workflow is a comprehensive safety net. As shown in the screenshot, this feature keeps the control in the user’s hands:

  • Reject: If you reject a config, the session stops. DBtune will then ask if you’d like to revert to the baseline or stay with the best configuration found so far.
  • Continue automatically: If you’ve seen enough and trust the trajectory, you can disable HITL mid-session and let the agent take over autonomously.
  • Accept: Approve the config and move to the next step of the tuning cycle.

Even if a tuning session cannot complete or times out, DBtune won't revert to baseline without your explicit approval.

AI-assisted PostgreSQL performance tuning with human oversight

The launch of Human-in-the-loop means you no longer have to choose between AI efficiency and human oversight. You get the speed of machine learning PostgreSQL optimization with the safety of a manual gatekeeper.

Ready to take the wheel? Log in to your DBtune dashboard today to start your first Human-in-the-loop session. Try it here, or read the documentation to learn more.

Frequently Asked Questions (FAQs)

Q: Does enabling Human-in-the-loop slow down the tuning process?
A: The AI optimizer works at the same speed, but the session pauses once a recommendation is generated. The total duration of the tuning session will depend on how quickly your team reviews and approves the pending configurations.

Q: Can I switch back to autonomous tuning in the middle of a session?
A: Yes! If you’ve reviewed a few suggestions and feel confident in DBtune’s recommendations, you can click "Continue automatically." This applies the current suggestion and allows the agent to handle all subsequent changes autonomously for the rest of that tuning session.

Q: What happens if I miss a notification and don’t review a configuration?
A: If a configuration remains "Awaiting review" for more than 3 days, the session will time out and fail. In this event, DBtune will prompt you to approve and revert to your baseline settings to ensure the database stays in a known, safe state.

Q: Can multiple team members review a configuration?
A: Any user with the appropriate database admin permissions in the DBtune dashboard can review and action a pending configuration. This supports collaborative enterprise environments where DevOps and DBA teams need to sync before making production changes.

Q: What do the blue highlights in the review dialog represent?
A: The blue highlights are designed for quick scannability. They specifically pinpoint which parameters DBtune is proposing to change relative to your original Baseline settings, so you don't have to hunt through a long list of variables.

Q: Is HITL available for all database flavors supported by DBtune?
A: Yes, Human-in-the-loop is a platform-level feature and is available for PostgreSQL performance tuning across all supported flavors, e.g., AWS RDS, Azure flexible server, Google Cloud SQL.

PostgreSQL
AI assistant
human-in-the-loop tuning

Get started

Get started or book a demo and discover how DBtune can improve your database performance.