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

store: Avoid 'too many bind params' error in FindDerivedEntityQuery #5318

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Apr 4, 2024

The FindDerivedQuery would contain a clause id not in (<lots of values>) where each entry in the list is a separate bind variable. If we have more than 65k derived entities already loaded into memory, this would require more bind variables than what Postgres supports. With this change, we pass those values as one array and therefore only need one bind variable.

@lutter lutter requested a review from leoyvens April 4, 2024 21:26
The FindDerivedQuery would contain a clause `id not in (<lots of values>)`
where each entry in the list is a separate bind variable. If we have more
than 65k derived entities already loaded into memory, this would require
more bind variables than what Postgres supports. With this change, we pass
those values as one array and therefore only need one bind variable.
@leoyvens leoyvens merged commit 4d2479c into master Apr 5, 2024
7 checks passed
@leoyvens leoyvens deleted the lutter/load-derived branch April 5, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants