JBAS-1799 Skip 2.10 SQL reingests
authorBill Erickson <berickxx@gmail.com>
Wed, 13 Sep 2017 14:20:12 +0000 (10:20 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Skip the partial reingests that came as part of the 2.9->2.10 SQL
upgrade.  Together they are no faster than a full re-ingest, which we
can run with more fine-grained control.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/2.9-to-2.10-upgrade-reingest.sql

index 33efc8c..2ec4c17 100644 (file)
@@ -1,12 +1,20 @@
 -- Deploy kcls-evergreen:2.9-to-2.10-upgrade-reingest to pg
 -- requires: 2.9-to-2.10-upgrade
 
--- BEGIN; -- TESTING ONLY 
+BEGIN; -- TESTING ONLY 
+
+SET STATEMENT_TIMEOUT = 0;
 
 -- Get rid of bad date1 sorter values so we can avoid a reingest
 SELECT 'Deleting bad pub dates ', CLOCK_TIMESTAMP();
 DELETE FROM metabib.record_sorter WHERE attr = 'pubdate' AND value !~ '^\d+$';
 
+--ROLLBACK; -- TESTING ONLY
+COMMIT;
+
+/* Running the individual partial re-ingests below is not saving us 
+    any time.  Will do a regular, full after-hours reingest instead */
+
 /*
 To use the new identifier|genre index, it is necessary to do
 a partial reingest of records that have a 655 tag. You can
@@ -14,15 +22,19 @@ cancel out of this if you wish and run this and the following
 attribute reingest later.
 */
 
+/*
 SELECT 'Running metabib.reingest_metabib_field_entries() ', CLOCK_TIMESTAMP();
+*/
 
 -- disable output on this big update.
+/*
 \o /dev/null
 SELECT metabib.reingest_metabib_field_entries(record, FALSE, TRUE, FALSE)
     FROM metabib.real_full_rec WHERE tag IN ('655') GROUP BY record;
 \o
 
 SELECT 'Running metabib.reingest_record_attributes() ', CLOCK_TIMESTAMP();
+*/
 
 /*
 This is a record attribute reingest of your bib records.
@@ -30,7 +42,9 @@ It will take a while.
 You may cancel now without losing the effect of the rest of the
 upgrade script, and arrange the reingest later.
 */
+/*
 SELECT COUNT(metabib.reingest_record_attributes(id))
     FROM biblio.record_entry WHERE deleted IS FALSE;
+*/
 
 -- ROLLBACK; -- TESTING ONLY