Match queries to a traffic budget with rules
postgres roles & traffic
// what it does
Rules decide which queries a budget governs — match by SQL fingerprint, keyspace, or tags. Create a rule pointing your known-heavy query shape at the budget and only that traffic class gets throttled.
// shell
$ pscale traffic-control rule create mydb main <budget-id> --fingerprint 'select * from analytics_events where ...'$ pscale traffic-control rule delete mydb main <budget-id> <rule-id>// gotcha
Get the fingerprint from your query insights before writing the rule; a too-broad match throttles innocent traffic, and no rules at all means the budget governs nothing.