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

fix: Avoid too large index on postgres as indexing just the last_editor column is enough #5260

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Nov 6, 2023

Postgres as limitations on the index size and the length is actually not applied there. This drops the index and recreates one just with the first column. As we always set or reset the last_editor together with the description_prev column having the index only for the small column is enough to query the relevant entries in the mapper.

Otherwise updating might fail with the following error:

Screenshot 2023-11-06 at 17 37 31

Signed-off-by: Julius Härtl <[email protected]>
@juliusknorr
Copy link
Member Author

/backport to stable27

@nextcloud nextcloud deleted a comment from mejo- Nov 6, 2023
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look sensible to me 👍

@juliusknorr juliusknorr merged commit 93e5ee7 into main Nov 7, 2023
46 of 56 checks passed
@juliusknorr juliusknorr deleted the bugfix/noid/postgres-index branch November 7, 2023 07:47
@juliusknorr
Copy link
Member Author

/backport to stable27

@juliusknorr
Copy link
Member Author

/backport 029082b to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants