From: Chris Sharp Date: Thu, 19 May 2022 12:59:14 +0000 (-0400) Subject: create the unlogged table X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5ae695b24dda855d8653cc4b15ff9465aad3ba06;p=evergreen%2Fpines.git create the unlogged table --- diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql index 5401162322..9dc4b0c2e6 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql @@ -1,5 +1,26 @@ BEGIN; +-- INSERT-only table that catches updates to be reconciled +CREATE UNLOGGED TABLE search.symspell_dictionary_updates ( + transaction_id BIGINT, + keyword_count INT NOT NULL DEFAULT 0, + title_count INT NOT NULL DEFAULT 0, + author_count INT NOT NULL DEFAULT 0, + subject_count INT NOT NULL DEFAULT 0, + series_count INT NOT NULL DEFAULT 0, + identifier_count INT NOT NULL DEFAULT 0, + + prefix_key TEXT NOT NULL, + + keyword_suggestions TEXT[], + title_suggestions TEXT[], + author_suggestions TEXT[], + subject_suggestions TEXT[], + series_suggestions TEXT[], + identifier_suggestions TEXT[] +); +CREATE INDEX symspell_dictionary_updates_tid_idx ON search.symspell_dictionary_updates (transaction_id); + CREATE OR REPLACE FUNCTION search.disable_symspell_reification () RETURNS VOID AS $f$ INSERT INTO config.internal_flag (name,enabled) VALUES ('ingest.disable_symspell_reification',TRUE)