apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.06k stars 344 forks source link

Remove use of postgres prepared queries #7018

Open jhg03a opened 2 years ago

jhg03a commented 2 years ago

This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:

Current behavior:

The current TO implementation uses prepared queries when interacting with the server objects. The use of prepared queries is incompatible with pgBouncer in transaction pooling mode. As a result, only session mode is available which still requires the use of TO-side database connection caps.

New behavior:

I'd like to see this removed so that transaction pooling will work with pgBouncer and therefore can uncap TO's database connection limits for significantly more efficient transaction throughput.

rawlinp commented 2 years ago

FYI for whoever picks this up, I think this might be the only prepared query we have so far. At least, that's the only one I noticed experiencing an error during steady-state operation after we tried transaction pooling.