From e5f87381240ecc950153e740d769b7fb3e800b07 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 24 Apr 2019 15:37:06 -0400 Subject: [PATCH] LP#1778940: (follow-up) create indexes concurrently during upgrade This reduces potential for locking when run in a production database, particularly if done outside of a full version upgrade. Signed-off-by: Galen Charlton --- .../src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql index a71030e8b4..be05e8e50d 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql @@ -1,9 +1,6 @@ -BEGIN; - +-- No transaction needed. This can be run on a live, production server. SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); -CREATE INDEX atev_template_output ON action_trigger.event (template_output); -CREATE INDEX atev_async_output ON action_trigger.event (async_output); -CREATE INDEX atev_error_output ON action_trigger.event (error_output); - -COMMIT; +CREATE INDEX CONCURRENTLY atev_template_output ON action_trigger.event (template_output); +CREATE INDEX CONCURRENTLY atev_async_output ON action_trigger.event (async_output); +CREATE INDEX CONCURRENTLY atev_error_output ON action_trigger.event (error_output); -- 2.11.0