flow_control
flow_control · Amazon RDS for PostgreSQL extension that throttles writes in Multi-AZ DB clusters to reduce replica lag.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100987 | flow_control | flow_control | 1.0 | ADMIN | Unknown | C |
PostgreSQL · 13, 14, 15, 16, 17, 18
Usage
Sources:
flow_control is an AWS-managed extension for RDS for PostgreSQL Multi-AZ DB clusters. Reader background workers report apply lag to the writer; when any reader exceeds the configured threshold, the writer worker adds delay at transaction end to reduce write pressure.
Operation and observation
AWS documents version 1.0. On a supported engine version and region, add the extension to the DB parameter group’s preload setting, reboot the instances as required by RDS, create it in the database, and inspect its statistics:
The documented default lag threshold is two minutes. Throttled sessions surface an Extension wait event in the activity view and Performance Insights. Parameter availability and change procedures are controlled by the RDS engine version and DB parameter group.
Scope and tradeoffs
This is not a portable extension for self-managed PostgreSQL, Aurora PostgreSQL, or a generic primary/standby installation. It is part of the RDS Multi-AZ DB cluster service and depends on AWS-managed communication among its instances.
Flow control is most useful for short, highly concurrent OLTP transactions. It is less effective when long batch transactions cause the lag, reduces writer throughput when active, and does not guarantee that lag stays below the target. AWS documents disabling it by removing flow_control from the preload list and rebooting the DB instance; test the write-latency and failover consequences before changing production settings.