-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
Marten keeps recreating indexes #3596
Comments
Based on your comments, I am assuming the names are not truncated in the Postgres index definition added in db. I will take a look and revert, most likely a delta detection which is seeing a difference causing it to recreate the indexes. Edit: A minimal repro would help. |
Thanks a lot for your swift feedback, on my side i'll look into making the repro |
Okay, I have been able to create a repro if you run drop index if exists marten_repro_schema.bwsp_idx_goho705dg4q_poho705d;
CREATE INDEX bwsp_idx_Goho705dg4q_poho705d ON marten_repro_schema.mt_doc_abccorp_people_documents USING btree ((data ->> 'Goho705dg4q33r68'), (data ->> 'Poho705dg4q33r68dfgr')); |
@nkosi23 Thanks for the repro, will take it from here |
@nkosi23 Quick note, I had troubleshooted and spent time, yet to zero in on it. I will keep you posted. |
@mysticmind Thanks a lot for your efforts! |
I encounter the same issue not only with indexes, but also with sequences.
is what the validation returns. |
@WilvanBil I am still troubleshooting to figure out a fix for the original issue raised, will also look at the issue what you have outlined with sequences. Can you please provide a repro? |
I have about 10 indexes for which Marten keeps creating a migration script looking like the below even though the indexes have been successfully created in the DB:
While I have changed the names for privacy reason, their length is pretty much intact as I suspect that this problem may be somehow related to the one where Marten didn't detect that objects with truncated names (because the name was too long) have been created in the DB. Some observations:
Since the objects are correctly created in postgresql, this looks like a Marten-side change detection issue.
The text was updated successfully, but these errors were encountered: