Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent queries pollute pg_stat_statements #164

Open
steve-chavez opened this issue Oct 26, 2024 · 0 comments
Open

Frequent queries pollute pg_stat_statements #164

steve-chavez opened this issue Oct 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@steve-chavez
Copy link
Member

steve-chavez commented Oct 26, 2024

Problem

Currently we run two queries every second (ref1, ref2, ref3), note that one does a DELETE to avoid having the http_request_queue from growing too much. This pollutes pg_stat_statements and causes some users to complain and wrongly think that pg_net is causing a lot of iops.

Solution

We can instead add the requests done with net.http_get and others to an in-memory queue, and then read from this queue whenever there are entries available.

This can be done without a breaking change by adding a trigger to the net.http_request_queue table.

Related

Solving this issue can be a stepping stone towards #62.

@steve-chavez steve-chavez added the enhancement New feature or request label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant