pgconfigurator
pgconfigurator

hot_standby_feedback

No restart — takes effect on reloadtuned by pgconfiguratorboolean (on/off)

Lets a read replica tell the primary not to vacuum rows its queries still need.

What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded

What it does

On a streaming standby that serves read queries, long-running queries can be cancelled when the primary vacuums away row versions the standby is still reading ('snapshot too old' style conflicts). hot_standby_feedback makes the standby report its oldest needed snapshot to the primary, so the primary delays cleaning up those rows.

How to tune it

Turn it on (on the standby) if you run long read queries on a replica and hit query cancellations. The trade-off: the primary keeps dead rows longer, which can increase bloat there. It's a balance between replica query stability and primary bloat.

FAQ

Why do queries on my replica get cancelled?
The primary vacuumed rows the replica's query still needed (a recovery conflict). Enabling hot_standby_feedback on the replica asks the primary to hold those rows back — at the cost of more potential bloat on the primary.

Related parameters