Skip to content
Snippets Groups Projects
Commit 001e46b3 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Conditionally disabled JIT optimizer during execution of update_posts_rshares...

Conditionally disabled JIT optimizer during execution of update_posts_rshares to eliminate LIVE SYNC slowdown. Related to issue #168
parent 398397e2
No related branches found
No related tags found
3 merge requests!518Delivery of new features and bugfixes into master branch.,!517Delivery of new features and bugfixes into master branch.,!513Conditionally disabled JIT optimizer during execution of update_posts_rshares
......@@ -8,9 +8,19 @@ LANGUAGE 'plpgsql'
VOLATILE
AS
$BODY$
DECLARE
__version INT;
BEGIN
SET LOCAL work_mem='2GB';
SELECT current_setting('server_version_num')::INT INTO __version;
IF __version >= 120000 THEN
SET LOCAL jit_above_cost = -1;
SET LOCAL jit_inline_above_cost = -1;
SET LOCAL jit_optimize_above_cost = -1;
END IF;
IF (_last_block - _first_block) > 10000 THEN
UPDATE hive_posts hp
SET
......@@ -84,6 +94,11 @@ ELSE
END IF;
RESET work_mem;
IF __version >= 120000 THEN
RESET jit_above_cost;
RESET jit_inline_above_cost;
RESET jit_optimize_above_cost;
END IF;
END;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment