logs-2023-05-03-040519/ 0000775 0001750 0001750 00000000000 14424364467 013256 5 ustar ubuntu ubuntu logs-2023-05-03-040519/mod-notify.log 0000664 0001750 0001750 00000176772 14424364467 016072 0 ustar ubuntu ubuntu exec java -XX:MaxRAMPercentage=66.0 -XX:+ExitOnOutOfMemoryError -cp . -jar /usr/verticles/mod-notify-fat.jar starting rest verticle service.......... 01:45:50 [] [] [] [] INFO RestVerticle git: https://github.com/folio-org/raml-module-builder.git 194ef255df4267dbf5e796ebee5d3d9eb65231fd 01:45:50 [] [] [] [] INFO RestVerticle metrics enabled: false 01:45:50 [] [] [] [] INFO Messages Loading messages from /infra-messages/APIMessages_en.properties ................................ 01:45:50 [] [] [] [] INFO Messages Loading messages from /infra-messages/APIMessages_de.properties ................................ 01:45:51 [] [] [] [] INFO Version HV000001: Hibernate Validator null 01:45:51 [] [] [] [] INFO RestRouting Looks like org.folio.rest.jaxrs.resource.Rmbtests is not implemented 01:45:51 [] [] [] [] INFO RestRouting Adding route DELETE /_/tenant/{operation_id} -> deleteTenantByOperationId 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /_/tenant/{operation_id} -> getTenantByOperationId 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /_/tenant -> postTenant 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /_/jsonSchemas -> getJsonSchemas 01:45:51 [] [] [] [] INFO RestRouting Adding route DELETE /notify/{id} -> deleteNotifyById 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /notify/{id} -> getNotifyById 01:45:51 [] [] [] [] INFO RestRouting Adding route PUT /notify/{id} -> putNotifyById 01:45:51 [] [] [] [] INFO RestRouting Adding route DELETE /notify/user/_self -> deleteNotifyUserSelf 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /notify/user/_self -> getNotifyUserSelf 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /notify/user/_self -> postNotifyUserSelf 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /notify -> getNotify 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /notify -> postNotify 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /notify/_username/{username} -> postNotifyUsernameByUsername 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /patron-notice -> postPatronNotice 01:45:51 [] [] [] [] INFO RestRouting Adding route DELETE /admin/kill_query -> deleteAdminKillQuery 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/cache_hit_rates -> getAdminCacheHitRates 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/db_cache_summary -> getAdminDbCacheSummary 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/health -> getAdminHealth 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/jstack -> getAdminJstack 01:45:51 [] [] [] [] INFO RestRouting Adding route PUT /admin/jstack -> putAdminJstack 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/list_locking_queries -> getAdminListLockingQueries 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/loglevel -> getAdminLoglevel 01:45:51 [] [] [] [] INFO RestRouting Adding route PUT /admin/loglevel -> putAdminLoglevel 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/memory -> getAdminMemory 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/postgres_active_sessions -> getAdminPostgresActiveSessions 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/postgres_load -> getAdminPostgresLoad 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/postgres_table_access_stats -> getAdminPostgresTableAccessStats 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/postgres_table_size -> getAdminPostgresTableSize 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/slow_queries -> getAdminSlowQueries 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/table_index_usage -> getAdminTableIndexUsage 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /admin/total_db_size -> getAdminTotalDbSize 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /admin/get_password -> postAdminGetPassword 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /admin/importSQL -> postAdminImportSQL 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /admin/postgres_maintenance -> postAdminPostgresMaintenance 01:45:51 [] [] [] [] INFO RestRouting Adding route POST /admin/set_AES_key -> postAdminSetAESKey 01:45:51 [] [] [] [] INFO RestRouting Adding route PUT /admin/postgres_create_indexes -> putAdminPostgresCreateIndexes 01:45:51 [] [] [] [] INFO RestRouting Adding route PUT /admin/postgres_drop_indexes -> putAdminPostgresDropIndexes 01:45:51 [] [] [] [] INFO RestRouting Adding route GET /_/ramls -> getRamls 01:45:51 [] [] [] [] INFO RestVerticle Listening port 8081 01:45:51 [] [] [] [] INFO RestVerticle No periodic implementation found, continuing with deployment 01:45:51 [] [] [] [] INFO RestVerticle No Post Deploy Hook implementation found, continuing with deployment 01:45:51 [] [] [] [] INFO ? Succeeded in deploying verticle 01:51:01 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO RestRouting invoking postTenant 01:51:01 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient DB config read from environment variables 01:51:01 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient postgreSQLClientConfig = {"maxPoolSize":5,"port":5432,"queryTimeout":60000,"username":"folio_admin","charset":"UTF-8","host":"10.36.1.144","database":"okapi_modules","password":"...","postgres_tester":false} 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Executing multiple statements with id -327209221 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE ROLE diku_mod_notify PASSWORD 'diku' NOSUPERUSER NOCREATEDB INHERIT LOGIN; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE ROLE diku_mod_notify PASSWORD 'diku' NOSUPERUSER NOCREATEDB INHERIT LOGIN; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} GRANT diku_mod_notify TO CURRENT_USER; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed GRANT diku_mod_notify TO CURRENT_USER; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE SCHEMA diku_mod_notify AUTHORIZATION diku_mod_notify; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE SCHEMA diku_mod_notify AUTHORIZATION diku_mod_notify; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} ALTER ROLE diku_mod_notify SET search_path = "$user"; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed ALTER ROLE diku_mod_notify SET search_path = "$user"; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ BEGIN BEGIN -- This only succeeds if show_trgm, a pg_trgm function, -- has been loaded into public schema. PERFORM public.show_trgm('a'); EXCEPTION WHEN undefined_function THEN BEGIN ALTER EXTENSION pg_trgm SET SCHEMA public; EXCEPTION WHEN undefined_object THEN NULL; END; END; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ BEGIN BEGIN -- This only succeeds if show_trgm, a pg_trgm function, -- has been loaded into public schema. PERFORM public.show_trgm('a'); EXCEPTION WHEN undefined_function THEN BEGIN ALTER EXTENSION pg_trgm SET SCHEMA public; EXCEPTION WHEN undefined_object THEN NULL; END; END; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='42710', message='extension "unaccent" already exists, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='extension.c', line='1761', routine='CreateExtension', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='42710', message='extension "pg_trgm" already exists, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='extension.c', line='1761', routine='CreateExtension', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_internal ( id SERIAL PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_internal ( id SERIAL PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} insert into diku_mod_notify.rmb_internal (jsonb) values ('{"rmbVersion": "35.0.0", "moduleVersion": "mod-notify-3.0.1-SNAPSHOT.127"}'::jsonb); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed insert into diku_mod_notify.rmb_internal (jsonb) values ('{"rmbVersion": "35.0.0", "moduleVersion": "mod-notify-3.0.1-SNAPSHOT.127"}'::jsonb); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_job ( id UUID PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_job ( id UUID PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO LogUtil 10.36.1.144:45324 POST /_/tenant null HTTP_1_1 201 421 1034 tid=diku Created 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Executing multiple statements with id -348872781 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} SET search_path TO diku_mod_notify; 01:51:02 [656322/proxy;973246/tenant] [diku] [] [mod_notify] INFO RestRouting invoking getTenantByOperationId 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed SET search_path TO diku_mod_notify; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_internal_index ( name text PRIMARY KEY, def text NOT NULL, remove boolean NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TABLE IF NOT EXISTS diku_mod_notify.rmb_internal_index ( name text PRIMARY KEY, def text NOT NULL, remove boolean NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} UPDATE diku_mod_notify.rmb_internal_index SET remove = TRUE; 01:51:02 [656322/proxy;973246/tenant] [diku] [] [mod_notify] INFO LogUtil 10.36.1.144:45324 GET /_/tenant/0293e757-71fb-4cd5-962b-a5c370599de0 null HTTP_1_1 200 421 25 tid=diku OK 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed UPDATE diku_mod_notify.rmb_internal_index SET remove = TRUE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TABLE IF NOT EXISTS rmb_internal_analyze ( tablename text ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TABLE IF NOT EXISTS rmb_internal_analyze ( tablename text ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.uuid_smaller(uuid, uuid) RETURNS uuid AS $$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 < $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.uuid_smaller(uuid, uuid) RETURNS uuid AS $$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 < $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.uuid_larger(uuid, uuid) RETURNS uuid AS $$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 > $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.uuid_larger(uuid, uuid) RETURNS uuid AS $$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 > $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.next_uuid(uuid) RETURNS uuid AS $$ DECLARE uuid text; digit text; BEGIN uuid = $1; FOR i IN REVERSE 36..1 LOOP digit := substring(uuid from i for 1); -- skip minus, version byte M and variant byte N CONTINUE WHEN digit = '-' OR i = 15 OR i = 20; CASE digit WHEN '0' THEN digit := '1'; WHEN '1' THEN digit := '2'; WHEN '2' THEN digit := '3'; WHEN '3' THEN digit := '4'; WHEN '4' THEN digit := '5'; WHEN '5' THEN digit := '6'; WHEN '6' THEN digit := '7'; WHEN '7' THEN digit := '8'; WHEN '8' THEN digit := '9'; WHEN '9' THEN digit := 'a'; WHEN 'a' THEN digit := 'b'; WHEN 'b' THEN digit := 'c'; WHEN 'c' THEN digit := 'd'; WHEN 'd' THEN digit := 'e'; WHEN 'e' THEN digit := 'f'; WHEN 'f' THEN digit := '0'; ELSE NULL; END CASE; uuid = overlay(uuid placing digit from i); EXIT WHEN digit <> '0'; END LOOP; RETURN uuid; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.next_uuid(uuid) RETURNS uuid AS $$ DECLARE uuid text; digit text; BEGIN uuid = $1; FOR i IN REVERSE 36..1 LOOP digit := substring(uuid from i for 1); -- skip minus, version byte M and variant byte N CONTINUE WHEN digit = '-' OR i = 15 OR i = 20; CASE digit WHEN '0' THEN digit := '1'; WHEN '1' THEN digit := '2'; WHEN '2' THEN digit := '3'; WHEN '3' THEN digit := '4'; WHEN '4' THEN digit := '5'; WHEN '5' THEN digit := '6'; WHEN '6' THEN digit := '7'; WHEN '7' THEN digit := '8'; WHEN '8' THEN digit := '9'; WHEN '9' THEN digit := 'a'; WHEN 'a' THEN digit := 'b'; WHEN 'b' THEN digit := 'c'; WHEN 'c' THEN digit := 'd'; WHEN 'd' THEN digit := 'e'; WHEN 'e' THEN digit := 'f'; WHEN 'f' THEN digit := '0'; ELSE NULL; END CASE; uuid = overlay(uuid placing digit from i); EXIT WHEN digit <> '0'; END LOOP; RETURN uuid; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE AGGREGATE diku_mod_notify.max(uuid) ( stype = uuid, sfunc = diku_mod_notify.uuid_larger, combinefunc = diku_mod_notify.uuid_larger, parallel = safe, sortop = operator (>) ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE AGGREGATE diku_mod_notify.max(uuid) ( stype = uuid, sfunc = diku_mod_notify.uuid_larger, combinefunc = diku_mod_notify.uuid_larger, parallel = safe, sortop = operator (>) ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE AGGREGATE diku_mod_notify.min(uuid) ( stype = uuid, sfunc = diku_mod_notify.uuid_smaller, combinefunc = diku_mod_notify.uuid_smaller, parallel = safe, sortop = operator (<) ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE AGGREGATE diku_mod_notify.min(uuid) ( stype = uuid, sfunc = diku_mod_notify.uuid_smaller, combinefunc = diku_mod_notify.uuid_smaller, parallel = safe, sortop = operator (<) ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP FUNCTION IF EXISTS diku_mod_notify.count_estimate_smart2(bigint,bigint,text); 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='function diku_mod_notify.count_estimate_smart2(pg_catalog.int8,pg_catalog.int8,text) does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP FUNCTION IF EXISTS diku_mod_notify.count_estimate_smart2(bigint,bigint,text); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE FUNCTION diku_mod_notify.count_estimate_smart2(rows bigint, lim bigint, query text) RETURNS bigint AS $$ DECLARE rec record; cnt bigint; BEGIN IF rows = lim THEN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP cnt := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN cnt IS NOT NULL; END LOOP; RETURN cnt; END IF; RETURN rows; END; $$ LANGUAGE plpgsql VOLATILE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE FUNCTION diku_mod_notify.count_estimate_smart2(rows bigint, lim bigint, query text) RETURNS bigint AS $$ DECLARE rec record; cnt bigint; BEGIN IF rows = lim THEN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP cnt := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN cnt IS NOT NULL; END LOOP; RETURN cnt; END IF; RETURN rows; END; $$ LANGUAGE plpgsql VOLATILE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.count_estimate_default(query text) RETURNS bigint AS $$ DECLARE rows bigint; q text; BEGIN q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 1000) x'; EXECUTE q INTO rows; IF rows < 1000 THEN return rows; END IF; rows = diku_mod_notify.count_estimate_smart2(1000, 1000, query); IF rows < 1000 THEN return 1000; END IF; RETURN rows; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.count_estimate_default(query text) RETURNS bigint AS $$ DECLARE rows bigint; q text; BEGIN q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 1000) x'; EXECUTE q INTO rows; IF rows < 1000 THEN return rows; END IF; rows = diku_mod_notify.count_estimate_smart2(1000, 1000, query); IF rows < 1000 THEN return 1000; END IF; RETURN rows; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.count_estimate(query text) RETURNS bigint AS $$ DECLARE count bigint; est_count bigint; q text; BEGIN est_count = diku_mod_notify.count_estimate_smart2(1000, 1000, query); IF est_count > 4*1000 THEN RETURN est_count; END IF; q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 1000) x'; EXECUTE q INTO count; IF count < 1000 THEN RETURN count; END IF; IF est_count < 1000 THEN RETURN 1000; END IF; RETURN est_count; END; $$ LANGUAGE plpgsql STABLE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.count_estimate(query text) RETURNS bigint AS $$ DECLARE count bigint; est_count bigint; q text; BEGIN est_count = diku_mod_notify.count_estimate_smart2(1000, 1000, query); IF est_count > 4*1000 THEN RETURN est_count; END IF; q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 1000) x'; EXECUTE q INTO count; IF count < 1000 THEN RETURN count; END IF; IF est_count < 1000 THEN RETURN 1000; END IF; RETURN est_count; END; $$ LANGUAGE plpgsql STABLE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.upsert(text, uuid, anyelement) RETURNS uuid AS $$ DECLARE ret uuid; BEGIN EXECUTE format('UPDATE diku_mod_notify.%I SET jsonb=$3 WHERE id=$2 RETURNING id', $1) USING $1, $2, $3 INTO ret; IF ret IS NOT NULL THEN RETURN ret; END IF; EXECUTE format('INSERT INTO diku_mod_notify.%I (id, jsonb) VALUES ($2, $3) RETURNING id', $1) USING $1, $2, $3 INTO STRICT ret; RETURN ret; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.upsert(text, uuid, anyelement) RETURNS uuid AS $$ DECLARE ret uuid; BEGIN EXECUTE format('UPDATE diku_mod_notify.%I SET jsonb=$3 WHERE id=$2 RETURNING id', $1) USING $1, $2, $3 INTO ret; IF ret IS NOT NULL THEN RETURN ret; END IF; EXECUTE format('INSERT INTO diku_mod_notify.%I (id, jsonb) VALUES ($2, $3) RETURNING id', $1) USING $1, $2, $3 INTO STRICT ret; RETURN ret; END; $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ DECLARE ver integer; BEGIN SELECT current_setting('server_version_num') INTO ver; IF (ver >= 120000) THEN CREATE OR REPLACE FUNCTION diku_mod_notify.f_unaccent(text) RETURNS text AS $f_unaccent$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $f_unaccent$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; ELSE CREATE OR REPLACE FUNCTION diku_mod_notify.f_unaccent(text) RETURNS text AS $f_unaccent$ SELECT regexp_replace(public.unaccent('public.unaccent', $1), E'[\u0300\u0301\u0302\u0303\u0304\u0305\u0306\u0307\u0308\u0309\u030a\u030b\u030c\u030d\u030e\u030f' || E'\u0310\u0311\u0312\u0313\u0314\u0315\u0316\u0317\u0318\u0319\u031a\u031b\u031c\u031d\u031e\u031f' || E'\u0320\u0321\u0322\u0323\u0324\u0325\u0326\u0327\u0328\u0329\u032a\u032b\u032c\u032d\u032e\u032f' || E'\u0330\u0331\u0332\u0333\u0334\u0335\u0336\u0337\u0338\u0339\u033a\u033b\u033c\u033d\u033e\u033f' || E'\u0340\u0341\u0342\u0343\u0344\u0345\u0346\u0347\u0348\u0349\u034a\u034b\u034c\u034d\u034e\u034f' || E'\u0350\u0351\u0352\u0353\u0354\u0355\u0356\u0357\u0358\u0359\u035a\u035b\u035c\u035d\u035e\u035f' || E'\u0360\u0361\u0362' || E'\u20dd\u20de\u20df\u20e0' || E'\u20e2\u20e3\u20e4]', '', 'g') $f_unaccent$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; END IF; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ DECLARE ver integer; BEGIN SELECT current_setting('server_version_num') INTO ver; IF (ver >= 120000) THEN CREATE OR REPLACE FUNCTION diku_mod_notify.f_unaccent(text) RETURNS text AS $f_unaccent$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $f_unaccent$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; ELSE CREATE OR REPLACE FUNCTION diku_mod_notify.f_unaccent(text) RETURNS text AS $f_unaccent$ SELECT regexp_replace(public.unaccent('public.unaccent', $1), E'[\u0300\u0301\u0302\u0303\u0304\u0305\u0306\u0307\u0308\u0309\u030a\u030b\u030c\u030d\u030e\u030f' || E'\u0310\u0311\u0312\u0313\u0314\u0315\u0316\u0317\u0318\u0319\u031a\u031b\u031c\u031d\u031e\u031f' || E'\u0320\u0321\u0322\u0323\u0324\u0325\u0326\u0327\u0328\u0329\u032a\u032b\u032c\u032d\u032e\u032f' || E'\u0330\u0331\u0332\u0333\u0334\u0335\u0336\u0337\u0338\u0339\u033a\u033b\u033c\u033d\u033e\u033f' || E'\u0340\u0341\u0342\u0343\u0344\u0345\u0346\u0347\u0348\u0349\u034a\u034b\u034c\u034d\u034e\u034f' || E'\u0350\u0351\u0352\u0353\u0354\u0355\u0356\u0357\u0358\u0359\u035a\u035b\u035c\u035d\u035e\u035f' || E'\u0360\u0361\u0362' || E'\u20dd\u20de\u20df\u20e0' || E'\u20e2\u20e3\u20e4]', '', 'g') $f_unaccent$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; END IF; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.get_tsvector(text) RETURNS tsvector AS $$ SELECT to_tsvector('simple', translate($1, '&', ',')); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.get_tsvector(text) RETURNS tsvector AS $$ SELECT to_tsvector('simple', translate($1, '&', ',')); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_and(text) RETURNS tsquery AS $$ SELECT to_tsquery('simple', string_agg(CASE WHEN length(v) = 0 OR v = '*' THEN '' WHEN right(v, 1) = '*' THEN '''' || left(v, -1) || ''':*' ELSE '''' || v || '''' END, '&')) FROM (SELECT regexp_split_to_table(translate($1, '&''', ',,'), ' +')) AS x(v); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_and(text) RETURNS tsquery AS $$ SELECT to_tsquery('simple', string_agg(CASE WHEN length(v) = 0 OR v = '*' THEN '' WHEN right(v, 1) = '*' THEN '''' || left(v, -1) || ''':*' ELSE '''' || v || '''' END, '&')) FROM (SELECT regexp_split_to_table(translate($1, '&''', ',,'), ' +')) AS x(v); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_or(text) RETURNS tsquery AS $$ SELECT replace(diku_mod_notify.tsquery_and($1)::text, '&', '|')::tsquery; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_or(text) RETURNS tsquery AS $$ SELECT replace(diku_mod_notify.tsquery_and($1)::text, '&', '|')::tsquery; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_phrase(text) RETURNS tsquery AS $$ SELECT replace(diku_mod_notify.tsquery_and($1)::text, '&', '<->')::tsquery; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.tsquery_phrase(text) RETURNS tsquery AS $$ SELECT replace(diku_mod_notify.tsquery_and($1)::text, '&', '<->')::tsquery; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.normalize_digits(text) RETURNS text AS $$ SELECT translate((regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1], E' \t-', '') || CASE WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1] = '' THEN '' WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2] = '' THEN '' ELSE ' ' END || (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2]; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.normalize_digits(text) RETURNS text AS $$ SELECT translate((regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1], E' \t-', '') || CASE WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1] = '' THEN '' WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2] = '' THEN '' ELSE ' ' END || (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2]; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.set_id_in_jsonb() RETURNS TRIGGER AS $$ BEGIN NEW.jsonb = jsonb_set(NEW.jsonb, '{id}', to_jsonb(NEW.id)); RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.set_id_in_jsonb() RETURNS TRIGGER AS $$ BEGIN NEW.jsonb = jsonb_set(NEW.jsonb, '{id}', to_jsonb(NEW.id)); RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} create or replace function diku_mod_notify.concat_space_sql(VARIADIC text[]) RETURNS text AS $$ select concat_ws(' ', VARIADIC $1); $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed create or replace function diku_mod_notify.concat_space_sql(VARIADIC text[]) RETURNS text AS $$ select concat_ws(' ', VARIADIC $1); $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} create or replace function diku_mod_notify.concat_array_object_values(jsonb_array jsonb, field text) RETURNS text AS $$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed create or replace function diku_mod_notify.concat_array_object_values(jsonb_array jsonb, field text) RETURNS text AS $$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} create or replace function diku_mod_notify.concat_array_object_values( jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text AS $$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1) WHERE value->>$3 = $4; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed create or replace function diku_mod_notify.concat_array_object_values( jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text AS $$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1) WHERE value->>$3 = $4; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} create or replace function diku_mod_notify.first_array_object_value( jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text AS $$ SELECT value->>$2 FROM jsonb_array_elements($1) WHERE value->>$3 = $4 LIMIT 1; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed create or replace function diku_mod_notify.first_array_object_value( jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text AS $$ SELECT value->>$2 FROM jsonb_array_elements($1) WHERE value->>$3 = $4 LIMIT 1; $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} create or replace function diku_mod_notify.concat_array_object(jsonb_array jsonb) RETURNS text AS $$ SELECT string_agg(value::text, ' ') FROM jsonb_array_elements_text($1); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed create or replace function diku_mod_notify.concat_array_object(jsonb_array jsonb) RETURNS text AS $$ SELECT string_agg(value::text, ' ') FROM jsonb_array_elements_text($1); $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP FUNCTION IF EXISTS rmb_internal_index(aname text, tops text, newdef text); 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='function rmb_internal_index(text,text,text) does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP FUNCTION IF EXISTS rmb_internal_index(aname text, tops text, newdef text); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION rmb_internal_index( atable text, aname text, tops text, newdef text) RETURNS void AS $$ DECLARE olddef text; namep CONSTANT text = concat(aname, '_p'); prepareddef text; BEGIN IF tops = 'DELETE' THEN -- use case insensitive %s, not case sensitive %I -- no SQL injection because the names are hard-coded in schema.json EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE 'DELETE FROM diku_mod_notify.rmb_internal_index WHERE name = $1' USING aname; RETURN; END IF; SELECT def INTO olddef FROM diku_mod_notify.rmb_internal_index WHERE name = aname; SELECT def INTO prepareddef FROM diku_mod_notify.rmb_internal_index WHERE name = namep; prepareddef = replace(prepareddef, concat(' ', namep, ' ON '), concat(' ', aname, ' ON ')); IF prepareddef = newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE format('ALTER INDEX IF EXISTS %s RENAME TO %s', namep, aname); EXECUTE 'DELETE FROM rmb_internal_index WHERE name = $1' USING namep; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; ELSIF olddef IS DISTINCT FROM newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE newdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; END IF; EXECUTE 'INSERT INTO diku_mod_notify.rmb_internal_index VALUES ($1, $2, FALSE) ' 'ON CONFLICT (name) DO UPDATE SET def = EXCLUDED.def, remove = EXCLUDED.remove' USING aname, newdef; END $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION rmb_internal_index( atable text, aname text, tops text, newdef text) RETURNS void AS $$ DECLARE olddef text; namep CONSTANT text = concat(aname, '_p'); prepareddef text; BEGIN IF tops = 'DELETE' THEN -- use case insensitive %s, not case sensitive %I -- no SQL injection because the names are hard-coded in schema.json EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE 'DELETE FROM diku_mod_notify.rmb_internal_index WHERE name = $1' USING aname; RETURN; END IF; SELECT def INTO olddef FROM diku_mod_notify.rmb_internal_index WHERE name = aname; SELECT def INTO prepareddef FROM diku_mod_notify.rmb_internal_index WHERE name = namep; prepareddef = replace(prepareddef, concat(' ', namep, ' ON '), concat(' ', aname, ' ON ')); IF prepareddef = newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE format('ALTER INDEX IF EXISTS %s RENAME TO %s', namep, aname); EXECUTE 'DELETE FROM rmb_internal_index WHERE name = $1' USING namep; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; ELSIF olddef IS DISTINCT FROM newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE newdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; END IF; EXECUTE 'INSERT INTO diku_mod_notify.rmb_internal_index VALUES ($1, $2, FALSE) ' 'ON CONFLICT (name) DO UPDATE SET def = EXCLUDED.def, remove = EXCLUDED.remove' USING aname, newdef; END $$ LANGUAGE plpgsql; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ BEGIN -- use advisory lock to prevent "tuple concurrently updated" -- https://issues.folio.org/browse/RMB-744 PERFORM pg_advisory_xact_lock(20201101, 1234567890); REVOKE ALL PRIVILEGES ON SCHEMA public FROM diku_mod_notify; REVOKE CREATE ON SCHEMA public FROM PUBLIC; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ BEGIN -- use advisory lock to prevent "tuple concurrently updated" -- https://issues.folio.org/browse/RMB-744 PERFORM pg_advisory_xact_lock(20201101, 1234567890); REVOKE ALL PRIVILEGES ON SCHEMA public FROM diku_mod_notify; REVOKE CREATE ON SCHEMA public FROM PUBLIC; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TABLE IF NOT EXISTS diku_mod_notify.notify_data ( id UUID PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TABLE IF NOT EXISTS diku_mod_notify.notify_data ( id UUID PRIMARY KEY, jsonb JSONB NOT NULL ); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS set_id_injson_notify_data ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "set_id_injson_notify_data" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS set_id_injson_notify_data ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS set_id_in_jsonb ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "set_id_in_jsonb" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS set_id_in_jsonb ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.set_id_in_jsonb(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.set_id_in_jsonb(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} ALTER TABLE diku_mod_notify.notify_data ADD COLUMN IF NOT EXISTS creation_date timestamp, ADD COLUMN IF NOT EXISTS created_by text; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed ALTER TABLE diku_mod_notify.notify_data ADD COLUMN IF NOT EXISTS creation_date timestamp, ADD COLUMN IF NOT EXISTS created_by text; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $do$ BEGIN PERFORM rmb_internal_index( 'notify_data', 'notify_data_text_idx_gin', 'ADD', 'CREATE INDEX IF NOT EXISTS notify_data_text_idx_gin ON diku_mod_notify.notify_data USING GIN ' || $rmb$((lower(f_unaccent(jsonb->>'text'))) public.gin_trgm_ops)$rmb$ ); END $do$; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='index "notify_data_text_idx_gin" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='SQL statement "DROP INDEX IF EXISTS notify_data_text_idx_gin" PL/pgSQL function rmb_internal_index(text,text,text,text) line 23 at EXECUTE SQL statement "SELECT rmb_internal_index( 'notify_data', 'notify_data_text_idx_gin', 'ADD', 'CREATE INDEX IF NOT EXISTS notify_data_text_idx_gin ON diku_mod_notify.notify_data USING GIN ' || $rmb$((lower(f_unaccent(jsonb->>'text'))) public.gin_trgm_ops)$rmb$ )" PL/pgSQL function inline_code_block line 3 at PERFORM', file='tablecmds.c', line='1201', routine='DropErrorMsgNonExistent', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $do$ BEGIN PERFORM rmb_internal_index( 'notify_data', 'notify_data_text_idx_gin', 'ADD', 'CREATE INDEX IF NOT EXISTS notify_data_text_idx_gin ON diku_mod_notify.notify_data USING GIN ' || $rmb$((lower(f_unaccent(jsonb->>'text'))) public.gin_trgm_ops)$rmb$ ); END $do$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS update_notify_data_references ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "update_notify_data_references" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS update_notify_data_references ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP FUNCTION IF EXISTS diku_mod_notify.update_notify_data_references(); 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='function diku_mod_notify.update_notify_data_references() does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP FUNCTION IF EXISTS diku_mod_notify.update_notify_data_references(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.notify_data_set_md() RETURNS TRIGGER AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(to_char(createdDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,updatedDate}', to_jsonb(to_char(createdDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.notify_data_set_md() RETURNS TRIGGER AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(to_char(createdDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,updatedDate}', to_jsonb(to_char(createdDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS set_notify_data_md_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "set_notify_data_md_trigger" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS set_notify_data_md_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TRIGGER set_notify_data_md_trigger BEFORE INSERT ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.notify_data_set_md(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TRIGGER set_notify_data_md_trigger BEFORE INSERT ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.notify_data_set_md(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE OR REPLACE FUNCTION diku_mod_notify.set_notify_data_md_json() RETURNS TRIGGER AS $$ DECLARE input text; updatedDate timestamp; BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(to_char(NEW.creation_date, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; input = NEW.jsonb->'metadata'->>'updatedDate'; if input IS NOT NULL then -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- updatedDate already has no time zone, normalize using ::timestamp updatedDate = input::timestamp; ELSE -- updatedDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string updatedDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,updatedDate}', to_jsonb(to_char(updatedDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); end if; RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE OR REPLACE FUNCTION diku_mod_notify.set_notify_data_md_json() RETURNS TRIGGER AS $$ DECLARE input text; updatedDate timestamp; BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(to_char(NEW.creation_date, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; input = NEW.jsonb->'metadata'->>'updatedDate'; if input IS NOT NULL then -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- updatedDate already has no time zone, normalize using ::timestamp updatedDate = input::timestamp; ELSE -- updatedDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string updatedDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,updatedDate}', to_jsonb(to_char(updatedDate, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'))); end if; RETURN NEW; END; $$ language 'plpgsql'; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS set_notify_data_md_json_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "set_notify_data_md_json_trigger" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS set_notify_data_md_json_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} CREATE TRIGGER set_notify_data_md_json_trigger BEFORE UPDATE ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.set_notify_data_md_json(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed CREATE TRIGGER set_notify_data_md_json_trigger BEFORE UPDATE ON diku_mod_notify.notify_data FOR EACH ROW EXECUTE PROCEDURE diku_mod_notify.set_notify_data_md_json(); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP TRIGGER IF EXISTS set_notify_data_ol_version_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='trigger "set_notify_data_ol_version_trigger" for relation "diku_mod_notify.notify_data" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP TRIGGER IF EXISTS set_notify_data_ol_version_trigger ON diku_mod_notify.notify_data CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DROP FUNCTION IF EXISTS diku_mod_notify.notify_data_set_ol_version() CASCADE; 01:51:02 [] [] [] [] WARN ? Backend notice: severity='NOTICE', code='00000', message='function diku_mod_notify.notify_data_set_ol_version() does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='dropcmds.c', line='491', routine='does_not_exist_skipping', schema='null', table='null', column='null', dataType='null', constraint='null' 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DROP FUNCTION IF EXISTS diku_mod_notify.notify_data_set_ol_version() CASCADE; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ DECLARE aname TEXT; BEGIN FOR aname IN SELECT name FROM diku_mod_notify.rmb_internal_index WHERE remove = TRUE LOOP EXECUTE 'DROP INDEX IF EXISTS ' || aname; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ DECLARE aname TEXT; BEGIN FOR aname IN SELECT name FROM diku_mod_notify.rmb_internal_index WHERE remove = TRUE LOOP EXECUTE 'DROP INDEX IF EXISTS ' || aname; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ DECLARE version TEXT; i RECORD; newindexdef TEXT; BEGIN SELECT jsonb->>'rmbVersion' INTO version FROM diku_mod_notify.rmb_internal; IF version !~ '^(\d\.|1\d\.|2[0-8]\.|29\.[0-3]\.)' THEN -- skip this upgrade if last install/upgrade was made by RMB >= 29.4.x RETURN; END IF; FOR i IN SELECT * FROM pg_catalog.pg_indexes WHERE schemaname = 'diku_mod_notify' LOOP newindexdef := regexp_replace(i.indexdef, -- \m = beginning of a word, \M = end of a word '\mpublic\.(f_unaccent|concat_space_sql|concat_array_object_values|concat_array_object)\M', 'diku_mod_notify.\1', 'g'); IF newindexdef <> i.indexdef THEN EXECUTE 'DROP INDEX ' || i.indexname; EXECUTE newindexdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING i.tablename; END IF; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ DECLARE version TEXT; i RECORD; newindexdef TEXT; BEGIN SELECT jsonb->>'rmbVersion' INTO version FROM diku_mod_notify.rmb_internal; IF version !~ '^(\d\.|1\d\.|2[0-8]\.|29\.[0-3]\.)' THEN -- skip this upgrade if last install/upgrade was made by RMB >= 29.4.x RETURN; END IF; FOR i IN SELECT * FROM pg_catalog.pg_indexes WHERE schemaname = 'diku_mod_notify' LOOP newindexdef := regexp_replace(i.indexdef, -- \m = beginning of a word, \M = end of a word '\mpublic\.(f_unaccent|concat_space_sql|concat_array_object_values|concat_array_object)\M', 'diku_mod_notify.\1', 'g'); IF newindexdef <> i.indexdef THEN EXECUTE 'DROP INDEX ' || i.indexname; EXECUTE newindexdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING i.tablename; END IF; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} DO $$ DECLARE t TEXT; BEGIN FOR t IN SELECT DISTINCT tablename FROM rmb_internal_analyze LOOP EXECUTE 'ANALYZE ' || t; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed DO $$ DECLARE t TEXT; BEGIN FOR t IN SELECT DISTINCT tablename FROM rmb_internal_analyze LOOP EXECUTE 'ANALYZE ' || t; END LOOP; END $$; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} TRUNCATE rmb_internal_analyze; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed TRUNCATE rmb_internal_analyze; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA diku_mod_notify TO diku_mod_notify; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA diku_mod_notify TO diku_mod_notify; 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient trying to execute: {} UPDATE diku_mod_notify.rmb_internal SET jsonb = jsonb || jsonb_build_object( 'rmbVersion', '35.0.0', 'moduleVersion', 'mod-notify-3.0.1-SNAPSHOT.127', 'schemaJson', $mainftl${ "tables": [ { "tableName": "notify_data", "withMetadata": true, "ginIndex": [ { "fieldName": "text", "tOps": "ADD", "caseSensitive": false, "removeAccents": true } ] } ] } $mainftl$); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO PostgresClient Successfully executed UPDATE diku_mod_notify.rmb_internal SET jsonb = jsonb || jsonb_build_object( 'rmbVersion', '35.0.0', 'moduleVersion', 'mod-notify-3.0.1-SNAPSHOT.127', 'schemaJson', $mainftl${ "tables": [ { "tableName": "notify_data", "withMetadata": true, "ginIndex": [ { "fieldName": "text", "tOps": "ADD", "caseSensitive": false, "removeAccents": true } ] } ] } $mainftl$); 01:51:02 [656322/proxy;668361/tenant] [diku] [] [mod_notify] INFO TenantAPI job 0293e757-71fb-4cd5-962b-a5c370599de0 completed 01:51:02 [656322/proxy;609633/tenant] [diku] [] [mod_notify] INFO RestRouting invoking getTenantByOperationId 01:51:02 [656322/proxy;609633/tenant] [diku] [] [mod_notify] INFO LogUtil 10.36.1.144:45324 GET /_/tenant/0293e757-71fb-4cd5-962b-a5c370599de0 null HTTP_1_1 200 420 4 tid=diku OK 01:51:02 [656322/proxy;540133/tenant] [diku] [] [mod_notify] INFO RestRouting invoking deleteTenantByOperationId 01:51:02 [656322/proxy;540133/tenant] [diku] [] [mod_notify] INFO LogUtil 10.36.1.144:45324 DELETE /_/tenant/0293e757-71fb-4cd5-962b-a5c370599de0 null HTTP_1_1 204 0 6 tid=diku No Content 04:54:08 [947003/patron-notice] [diku] [77b00ce0-73eb-59a8-8bbd-539cfec9bc32] [mod_notify] INFO RestRouting invoking postPatronNotice 04:54:08 [947003/patron-notice] [diku] [77b00ce0-73eb-59a8-8bbd-539cfec9bc32] [mod_notify] INFO iModulesClientHelper buildTemplateProcessingRequest:: result: TemplateProcessingRequest 04:54:09 [947003/patron-notice] [diku] [77b00ce0-73eb-59a8-8bbd-539cfec9bc32] [mod_notify] INFO NoticesClient postTemplateRequest:: result: {r "templateId" : "06b1774a-cca2-4a10-8f0d-1f6f7e076215",r "result" : {r "header" : "Fee testing",r "body" : "