The current request rate of 200 req/s (pg_net.batch_size) is too low for several cases. It's limited this way to save on CPU usage, but this can be improved.
For example, right now the net._http_response tables store the response headers as jsonb. For this, processing is needed on each request/response to convert the headers to jsonb, which consumes CPU.
Solution
Store the response headers as binary and then provide a view that converts them to json on demand. This can be done without a breaking change.
Problem
The current request rate of 200 req/s (
pg_net.batch_size
) is too low for several cases. It's limited this way to save on CPU usage, but this can be improved.For example, right now the
net._http_response
tables store the response headers as jsonb. For this, processing is needed on each request/response to convert the headers to jsonb, which consumes CPU.Solution
Store the response headers as binary and then provide a view that converts them to json on demand. This can be done without a breaking change.