From 003d3312fd3fe7759f4704b0a381fdd224357076 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 8 Dec 2023 15:47:18 -0500 Subject: [PATCH 1/2] Permit the index creation to run concurrently --- changelog.d/migration-fix.skip | 1 + .../20220527134341_add_quote_url_index_to_objects.exs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/migration-fix.skip diff --git a/changelog.d/migration-fix.skip b/changelog.d/migration-fix.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/changelog.d/migration-fix.skip @@ -0,0 +1 @@ + diff --git a/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs index c746f12a1..01b14bda8 100644 --- a/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs +++ b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs @@ -6,6 +6,11 @@ defmodule Pleroma.Repo.Migrations.AddQuoteUrlIndexToObjects do use Ecto.Migration def change do - create_if_not_exists(index(:objects, ["(data->'quoteUrl')"], name: :objects_quote_url)) + create_if_not_exists( + index(:objects, ["(data->'quoteUrl')"], + name: :objects_quote_url, + concurrently: true + ) + ) end end From ee15939d33adee28007a71f02172dcc5fc1f20c5 Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 9 Dec 2023 05:54:02 +0000 Subject: [PATCH 2/2] Skip transaction to generate the index concurrently --- .../migrations/20220527134341_add_quote_url_index_to_objects.exs | 1 + 1 file changed, 1 insertion(+) diff --git a/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs index 01b14bda8..d77db34cd 100644 --- a/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs +++ b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs @@ -4,6 +4,7 @@ defmodule Pleroma.Repo.Migrations.AddQuoteUrlIndexToObjects do use Ecto.Migration + @disable_ddl_transaction true def change do create_if_not_exists(