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

Remove first two unused indexes #376

Merged
merged 10 commits into from
May 10, 2024
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SET statement_timeout = 0;

--bun:split

CREATE INDEX CONCURRENTLY IF NOT EXISTS message_pubsubTopic_idx ON public.message (pubsubTopic);
Copy link
Contributor

Choose a reason for hiding this comment

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

Without CONCURRENTLY, does the server start up extremely slowly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would also take a lock of the entire table and block reads

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm having problems actually running concurrent index drops in a migration (for some reason it is trying to run the migration in a tx, which is not allowed). I might just make this non-concurrent but manually drop the index concurrently in prod first.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SET statement_timeout = 0;

DROP INDEX CONCURRENTLY IF EXISTS messageindex;
neekolas marked this conversation as resolved.
Show resolved Hide resolved
DROP INDEX CONCURRENTLY IF EXISTS message_pubsubtopic_idx;
Loading