LP#1778940: (follow-up) create indexes concurrently during upgrade
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 24 Apr 2019 19:37:06 +0000 (15:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 24 Apr 2019 19:37:06 +0000 (15:37 -0400)
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 <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.ate_outputs_indexes.sql

index a71030e..be05e8e 100644 (file)
@@ -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);