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

Config flag for disabling Prefer: count=exact #2777

Open
steve-chavez opened this issue May 8, 2023 · 0 comments · May be fixed by #2984
Open

Config flag for disabling Prefer: count=exact #2777

steve-chavez opened this issue May 8, 2023 · 0 comments · May be fixed by #2984
Labels
config related to the configuration options idea Needs of discussion to become an enhancement, not ready for implementation

Comments

@steve-chavez
Copy link
Member

steve-chavez commented May 8, 2023

We currently rely on this guide for protecting against full counts on big tables: https://postgrest.org/en/v10.2/admin.html#count-header-dos

Which is incomplete because AFAICT Nginx can't remove a header based on a value OOTB. It will always remove the whole header. We'd need OpenResty for this.

Now, this problem has already been solved with the estimated and planned count.

We just need to disable the Prefer: count=exact. We can do this with a config option.

db-exact-count-enable = false
@steve-chavez steve-chavez added enhancement a feature, ready for implementation config related to the configuration options idea Needs of discussion to become an enhancement, not ready for implementation and removed enhancement a feature, ready for implementation labels May 8, 2023
@taimoorzaeem taimoorzaeem linked a pull request Oct 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config related to the configuration options idea Needs of discussion to become an enhancement, not ready for implementation
Development

Successfully merging a pull request may close this issue.

1 participant