Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job execution stats to telemetry #4824

Merged
merged 1 commit into from Nov 4, 2022

Conversation

konskov
Copy link
Contributor

@konskov konskov commented Oct 14, 2022

No description provided.

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from 24e8c0f to f4505a5 Compare October 17, 2022 07:07
@konskov
Copy link
Contributor Author

konskov commented Oct 17, 2022

TODO

  • errors by sqlerrcode
  • schema change to separate successful duration vs unsuccessful duration
  • total executions, successes, failures, crashes, duration, max consecutive failures and crashes
  • tests
  • Add tests for the new schema change? (total_duration_failures?)
  • Instead of throwing error if unexpected response is given from SPI, return NULL jsonb for these queries
  • Measure query latency with some sample data?

TOFIX

  • garbage value returned for the job stats query (for max failures?)
  • update failing tests due to schema change

Comment on lines 395 to 414
"SELECT ("
" case WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_retention\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_compression\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_reorder\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_refresh_continuous_aggregate\' then q.proc_name::text "
" ELSE \'user_defined_action\'::text "
" end"
") as job_type, sum(total_runs)::bigint as total_runs, sum(total_successes)::bigint as "
"total_successes,"
"sum(total_failures)::bigint as total_failures, sum(total_crashes)::bigint as "
"total_crashes,"
"sum(total_duration) as total_duration, sum(total_duration_failures) as total_duration_failures, max(consecutive_failures)::int as "
"max_consecutive_failures, max(consecutive_crashes)::int as max_consecutive_crashes "
"FROM "
"(select j.proc_schema, j.proc_name, s.total_runs, s.total_successes, s.total_failures,"
"s.total_crashes, s.total_duration, s.total_duration_failures, s.consecutive_crashes, s.consecutive_failures "
"FROM "
"_timescaledb_internal.bgw_job_stat s join _timescaledb_config.bgw_job j on j.id = "
"s.job_id) q "
"GROUP BY job_type";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"SELECT ("
" case WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_retention\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_compression\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_reorder\' then q.proc_name::text "
" WHEN q.proc_schema = \'_timescaledb_internal\' AND q.proc_name = \'policy_refresh_continuous_aggregate\' then q.proc_name::text "
" ELSE \'user_defined_action\'::text "
" end"
") as job_type, sum(total_runs)::bigint as total_runs, sum(total_successes)::bigint as "
"total_successes,"
"sum(total_failures)::bigint as total_failures, sum(total_crashes)::bigint as "
"total_crashes,"
"sum(total_duration) as total_duration, sum(total_duration_failures) as total_duration_failures, max(consecutive_failures)::int as "
"max_consecutive_failures, max(consecutive_crashes)::int as max_consecutive_crashes "
"FROM "
"(select j.proc_schema, j.proc_name, s.total_runs, s.total_successes, s.total_failures,"
"s.total_crashes, s.total_duration, s.total_duration_failures, s.consecutive_crashes, s.consecutive_failures "
"FROM "
"_timescaledb_internal.bgw_job_stat s join _timescaledb_config.bgw_job j on j.id = "
"s.job_id) q "
"GROUP BY job_type";
"SELECT "
" CASE "
" WHEN j.proc_schema = \'_timescaledb_internal\' AND j.proc_name ~ \'^policy_(retention|compression|reorder|refresh_continuous_aggregate)$\' THEN j.proc_name::text "
" ELSE \'user_defined_action\'::text "
" END AS job_type, "
" sum(s.total_runs)::bigint AS total_runs, "
" sum(s.total_successes)::bigint AS total_successes, "
" sum(s.total_failures)::bigint AS total_failures, "
" sum(s.total_crashes)::bigint AS total_crashes, "
" sum(s.total_duration) AS total_duration, "
" sum(s.total_duration_failures) AS total_duration_failures, "
" max(s.consecutive_failures)::int AS max_consecutive_failures, "
" max(s.consecutive_crashes)::int AS max_consecutive_crashes "
"FROM "
" _timescaledb_internal.bgw_job_stat s "
" JOIN _timescaledb_config.bgw_job j ON j.id = s.job_id "
"GROUP BY "
" job_type "

I didn't test but just for better code readability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful, thank you! Changed it as you suggest

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from 350a088 to 49003cd Compare October 18, 2022 07:27
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #4824 (8da38a9) into main (f153566) will increase coverage by 26.46%.
The diff coverage is 90.20%.

❗ Current head 8da38a9 differs from pull request most recent head 0e6ee72. Consider uploading reports for the commit 0e6ee72 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4824       +/-   ##
===========================================
+ Coverage   63.05%   89.52%   +26.46%     
===========================================
  Files         226      226               
  Lines       44692    50818     +6126     
===========================================
+ Hits        28182    45496    +17314     
+ Misses      16510     5322    -11188     
Impacted Files Coverage Δ
src/ts_catalog/catalog.h 100.00% <ø> (ø)
src/telemetry/telemetry.c 85.94% <89.78%> (+80.55%) ⬆️
src/bgw/job_stat.c 91.87% <100.00%> (+83.24%) ⬆️
tsl/test/src/test_chunk_stats.c 92.59% <0.00%> (-7.41%) ⬇️
src/uuid.c 78.57% <0.00%> (-6.05%) ⬇️
src/histogram.c 83.83% <0.00%> (-4.80%) ⬇️
tsl/src/fdw/fdw_utils.c 80.76% <0.00%> (-4.65%) ⬇️
src/time_utils.c 93.72% <0.00%> (-3.78%) ⬇️
src/time_bucket.c 95.28% <0.00%> (-3.11%) ⬇️
tsl/src/remote/copy_fetcher.c 78.39% <0.00%> (-2.81%) ⬇️
... and 204 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f153566...0e6ee72. Read the comment docs.

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from 27d0b42 to 8b25087 Compare October 18, 2022 09:55
@konskov konskov marked this pull request as ready for review October 18, 2022 10:52
Copy link
Member

@svenklemm svenklemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should fully schema-qualify everything in your SPI queries.

You can use pgspot like so to check for unqualified references:

pgspot <<<"SELECT (CASE WHEN j.proc_schema = '_timescaledb_internal' AND j.proc_name ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate)$' THEN j.proc_name::text ELSE 'user_defined_action'::text end) as job_type, sum(total_runs)::bigint as total_runs,  sum(total_successes)::bigint as total_successes,        sum(total_failures)::bigint as total_failures,  sum(total_crashes)::bigint as total_crashes,    sum(total_duration) as total_duration,       sum(total_duration_failures) as total_duration_failures,        max(consecutive_failures)::int as max_consecutive_failures,     max(consecutive_crashes)::int as max_consecutive_crashes FROM   _timescaledb_internal.bgw_job_stat s JOIN _timescaledb_config.bgw_job j on j.id = s.job_id GROUP BY job_type"
PS016: Unqualified function call: sum at line 2
PS016: Unqualified function call: sum at line 2
PS001: Unqualified operator: '=' in j.id = s.job_id at line 2
PS017: Unqualified object reference: text in CAST('user_defined_action' AS text) at line 2
PS016: Unqualified function call: sum at line 2
PS016: Unqualified function call: sum at line 2
PS016: Unqualified function call: sum at line 2
PS016: Unqualified function call: sum at line 2
PS016: Unqualified function call: max at line 2
PS016: Unqualified function call: max at line 2
PS017: Unqualified object reference: text in CAST(j.proc_name AS text) at line 2
PS001: Unqualified operator: '=' in j.proc_schema = '_timescaledb_internal' at line 2
PS001: Unqualified operator: '~' in j.proc_name ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate)$' at line 2
Errors: 2 Warnings: 11 Unknown: 0

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from d25fb70 to 88f5b80 Compare October 19, 2022 07:47
@konskov
Copy link
Contributor Author

konskov commented Oct 20, 2022

Pasting some performance details for the query that groups by sqlerrcode:

select job_type, pg_catalog.jsonb_object_agg(sqlerrcode, count)
FROM
(
select (
  CASE WHEN error_data->> 'proc_schema' = '_timescaledb_internal' AND error_data->> 'proc_name' ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate|telemetry|error_job_retention)$'
  THEN error_data ->> 'proc_name'
  ELSE 'user_defined_action'
  end
) as job_type, error_data->> 'sqlerrcode' as sqlerrcode, pg_catalog.count(*)
from _timescaledb_internal.job_errors
where error_data->> 'sqlerrcode' is not null
GROUP BY job_type, error_data->> 'sqlerrcode' ORDER BY job_type
) q
GROUP BY q.job_type;

The table _timescaledb_internal.job_errors is populated with randomly generated data and is ~400MB and has 1.36 million entries, the oldest one being 3 months old.
Errors are distributed as follows per job type:

-[ RECORD 1 ]-----------------
job_type | policy_compression
count    | 273211
-[ RECORD 2 ]-----------------
job_type | policy_reorder
count    | 272672
-[ RECORD 3 ]-----------------
job_type | policy_retention
count    | 273386
-[ RECORD 4 ]-----------------
job_type | user_defined_action
count    | 548734

The query takes 3.5 sec to execute and here's the query plan:

-[ RECORD 1 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN | GroupAggregate  (cost=133571.30..181795.19 rows=200 width=64) (actual time=3143.144..3415.145 rows=4 loops=1)
-[ RECORD 2 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |   Group Key: (CASE WHEN (((job_errors.error_data ->> 'proc_schema'::text) = '_timescaledb_internal'::text) AND ((job_errors.error_data ->> 'proc_name'::text) ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate|telemetry|error_job_retention)$'::text)) THEN (job_errors.error_data ->> 'proc_name'::text) ELSE 'user_defined_action'::text END)
-[ RECORD 3 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |   Buffers: shared hit=13872 read=27260, temp read=5902 written=5938
-[ RECORD 4 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |   ->  Finalize GroupAggregate  (cost=133571.30..179740.69 rows=136800 width=72) (actual time=3063.003..3413.527 rows=1000 loops=1)
-[ RECORD 5 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |         Group Key: (CASE WHEN (((job_errors.error_data ->> 'proc_schema'::text) = '_timescaledb_internal'::text) AND ((job_errors.error_data ->> 'proc_name'::text) ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate|telemetry|error_job_retention)$'::text)) THEN (job_errors.error_data ->> 'proc_name'::text) ELSE 'user_defined_action'::text END), ((job_errors.error_data ->> 'sqlerrcode'::text))
-[ RECORD 6 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |         Buffers: shared hit=13872 read=27260, temp read=5902 written=5938
-[ RECORD 7 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |         ->  Gather Merge  (cost=133571.30..174268.69 rows=273600 width=72) (actual time=3062.768..3412.525 rows=2885 loops=1)
-[ RECORD 8 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |               Workers Planned: 2
-[ RECORD 9 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |               Workers Launched: 2
-[ RECORD 10 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |               Buffers: shared hit=13872 read=27260, temp read=5902 written=5938
-[ RECORD 11 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |               ->  Partial GroupAggregate  (cost=132571.27..141688.43 rows=136800 width=72) (actual time=3036.867..3382.146 rows=962 loops=3)
-[ RECORD 12 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                     Group Key: (CASE WHEN (((job_errors.error_data ->> 'proc_schema'::text) = '_timescaledb_internal'::text) AND ((job_errors.error_data ->> 'proc_name'::text) ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate|telemetry|error_job_retention)$'::text)) THEN (job_errors.error_data ->> 'proc_name'::text) ELSE 'user_defined_action'::text END), ((job_errors.error_data ->> 'sqlerrcode'::text))
-[ RECORD 13 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                     Buffers: shared hit=13872 read=27260, temp read=5902 written=5938
-[ RECORD 14 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                     ->  Sort  (cost=132571.27..133995.56 rows=569716 width=64) (actual time=3036.465..3295.777 rows=455772 loops=3)
-[ RECORD 15 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           Sort Key: (CASE WHEN (((job_errors.error_data ->> 'proc_schema'::text) = '_timescaledb_internal'::text) AND ((job_errors.error_data ->> 'proc_name'::text) ~ '^policy_(retention|compression|reorder|refresh_continuous_aggregate|telemetry|error_job_retention)$'::text)) THEN (job_errors.error_data ->> 'proc_name'::text) ELSE 'user_defined_action'::text END), ((job_errors.error_data ->> 'sqlerrcode'::text))
-[ RECORD 16 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           Sort Method: external merge  Disk: 16040kB
-[ RECORD 17 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           Buffers: shared hit=13872 read=27260, temp read=5902 written=5938
-[ RECORD 18 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           Worker 0:  Sort Method: external merge  Disk: 15736kB
-[ RECORD 19 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           Worker 1:  Sort Method: external merge  Disk: 15440kB
-[ RECORD 20 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                           ->  Parallel Seq Scan on job_errors  (cost=0.00..56686.76 rows=569716 width=64) (actual time=0.370..2445.202 rows=455772 loops=3)
-[ RECORD 21 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                                 Filter: ((error_data ->> 'sqlerrcode'::text) IS NOT NULL)
-[ RECORD 22 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                                 Rows Removed by Filter: 229
-[ RECORD 23 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |                                 Buffers: shared hit=13756 read=27260
-[ RECORD 24 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN | Planning:
-[ RECORD 25 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN |   Buffers: shared hit=6
-[ RECORD 26 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN | Planning Time: 1.619 ms
-[ RECORD 27 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QUERY PLAN | Execution Time: 3416.503 ms

Results:

-[ RECORD 1 ]----+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
job_type         | policy_compression
jsonb_object_agg | {"00E53A": 1364, "0251CF": 1308, "029D3B": 1342, "03DA28": 1431, "0461D8": 1332, "092F9B": 1442, "0993CC": 1407, "0A3E83": 1371, "102E50": 1410, "10F56E": 1345, "12066A": 1392, "13A519": 1338, "141A9D": 1370, "18AE9F": 1364, "18FB1A": 1396, "19795C": 1347, "1B8963": 1422, "1C31E9": 1357, "1CC917": 1305, "1D33A4": 1382, "1FB7A7": 1344, "22A34E": 1370, "2367DA": 1340, "2484C9": 1307, "24CFF4": 1355, "257A2A": 1407, "265FB2": 1381, "267B50": 1373, "287CBF": 1349, "29BDBF": 1394, "2BB991": 1333, "2BC808": 1309, "2C1A6B": 1399, "2D2AC1": 1337, "2D6BFD": 1360, "2FCAB0": 1350, "3107CC": 1329, "31AFDC": 1401, "31F377": 1358, "3211F0": 1364, "32E072": 1363, "3317F5": 1386, "33BF8B": 1386, "34C914": 1367, "34ECBF": 1395, "354005": 1387, "369D41": 1434, "36E235": 1310, "383EFA": 1374, "398FAE": 1306, "3B8FA2": 1359, "3C0F65": 1346, "3D672C": 1339, "3E24C0": 1374, "3E3C92": 1379, "4139E5": 1432, "421104": 1355, "42A2CA": 1353, "42F0C9": 1349, "43167C": 1329, "48DED0": 1376, "48E860": 1362, "4B08ED": 1355, "4D5A91": 1359, "4DEC20": 1392, "4F316E": 1411, "4F484B": 1343, "50E3D3": 1356, "52B80F": 1399, "532F7C": 1379, "53EF1A": 1354, "544277": 1354, "57F22F": 1406, "58B1E5": 1409, "58EEDD": 1341, "5BCF44": 1389, "5BEB93": 1367, "5BF9CE": 1365, "5CC0A0": 1375, "5CFD6E": 1450, "5E1E0F": 1310, "5EFF16": 1342, "60DDD7": 1351, "63179D": 1397, "649F33": 1398, "66CD7A": 1369, "6781B0": 1393, "682822": 1377, "683FC5": 1386, "6A40DC": 1310, "6BE68C": 1360, "6C0D1A": 1351, "6D2D40": 1415, "6D65FC": 1330, "6E4ADF": 1358, "7048B0": 1418, "70EE44": 1358, "74A4F7": 1386, "75391B": 1377, "759060": 1360, "78FE98": 1356, "792BAA": 1314, "7CE614": 1424, "7D35F2": 1332, "7DA9FB": 1299, "8122C0": 1337, "824676": 1431, "85FAD2": 1354, "872425": 1325, "897BE6": 1454, "89A9B7": 1384, "8C28FA": 1370, "8D6537": 1383, "8DAE2C": 1362, "8EC06D": 1366, "8EC7A4": 1358, "8F209A": 1357, "93AD48": 1392, "956BD4": 1455, "96019E": 1373, "96FF0E": 1360, "97B90B": 1341, "98E084": 1300, "990C32": 1372, "9A037C": 1327, "9BF29C": 1326, "9D0E04": 1389, "9DBA6D": 1424, "9E1D13": 1370, "9E442D": 1395, "9EF453": 1363, "A08095": 1341, "A0F2B6": 1417, "A1243A": 1429, "A47BE8": 1321, "A67091": 1429, "A92996": 1381, "A9ADCF": 1406, "AA72E7": 1384, "AB1B77": 1374, "AB35B8": 1395, "AD2354": 1408, "AF6D23": 1345, "B023B7": 1405, "B0BD28": 1379, "B1926E": 1365, "B3CF10": 1358, "B43C97": 1371, "B450DE": 1342, "B4C8FB": 1365, "B829C5": 1398, "B8888A": 1356, "B95B29": 1374, "BA9ADB": 1346, "BD9140": 1358, "BDC583": 1366, "BDFB60": 1354, "BE4997": 1345, "C02F85": 1312, "C13EE7": 1347, "C5F1A1": 1348, "C62C45": 1286, "C64463": 1344, "C80E5A": 1403, "C82730": 1371, "C89522": 1394, "C97DD1": 1380, "CA10BF": 1366, "CB370B": 1342, "CC334E": 1367, "CC6A54": 1453, "CF6A67": 1336, "D0B966": 1283, "D2C320": 1376, "D6F248": 1386, "D72968": 1363, "D783D1": 654, "DB8F6D": 1338, "DCCCC9": 1336, "DDCF20": 1376, "E0AAD9": 1345, "E1AE5F": 1378, "E6CFAE": 1378, "E94B5D": 1356, "E9FF71": 1354, "EA22A1": 1415, "EC268D": 1390, "ED0E79": 1444, "EE46DD": 1390, "EFC3B7": 1366, "F2898F": 1359, "F4AF30": 1388, "F53941": 1330, "F79EBC": 1412, "F7AFA4": 1433, "F97F1D": 1468, "FA251C": 1392, "FA4FC2": 1416, "FC9901": 1328, "FD6269": 1375}
-[ RECORD 2 ]----+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
job_type         | policy_reorder
jsonb_object_agg | {"029B31": 1367, "03A707": 1345, "063C3F": 1383, "07B13E": 1305, "0852A5": 1368, "086C06": 1310, "08A064": 1413, "0955EA": 1413, "0A65F4": 1393, "0BC28F": 1370, "0C445E": 1350, "0C781D": 1438, "0D7DA3": 1377, "0FBA64": 1358, "11559F": 1387, "11F653": 1284, "137941": 1304, "156A7C": 1397, "171A49": 1374, "192AEB": 1390, "1A3630": 1373, "1B07C8": 1394, "1B565F": 1364, "1BA113": 1329, "1CF541": 1341, "1EA524": 1376, "1F9F6C": 1369, "203E2A": 1420, "217A91": 1406, "25B28D": 1384, "262797": 1404, "286766": 1376, "2987E9": 1346, "2A335F": 1428, "2B71B5": 1369, "2BA640": 1370, "2E9EFC": 1403, "2EA2C5": 1378, "34563B": 1336, "34A425": 1399, "387A9D": 1396, "399DE9": 1314, "3B30EC": 1367, "3E1385": 1446, "3F4792": 1281, "443781": 1354, "460D93": 1411, "47467B": 1371, "484306": 1388, "484C01": 1422, "488F8A": 1396, "498A7D": 1391, "4B06DF": 1340, "4EC2A1": 1282, "4EE945": 1347, "506E3A": 1328, "50B911": 1403, "53954A": 1412, "53AA0F": 1310, "563C7F": 1347, "57C24D": 1351, "59E355": 1420, "5A7883": 1381, "5B36EC": 1333, "5B4C9D": 1324, "5BEB66": 1333, "5EF416": 1342, "60AE58": 1328, "619376": 1323, "6200EA": 1423, "62546A": 1350, "62D2FA": 1350, "62F37B": 1383, "65AFA0": 1419, "65B2C9": 1370, "668925": 1399, "66A321": 1353, "674F96": 1356, "67860C": 1362, "67F286": 1410, "680A3A": 1397, "6962CA": 1342, "69FDEF": 1335, "6A4105": 1327, "6A786A": 1359, "6AE120": 1378, "715A1A": 1391, "72B736": 1287, "72C099": 1379, "741C53": 1323, "75DD1F": 1367, "768D33": 1388, "76D8EE": 1355, "77825E": 1376, "7A3FF4": 1386, "7DC99B": 1367, "7E5E88": 1362, "8079E7": 1468, "815E1A": 1358, "8248BC": 1354, "830435": 1412, "84BD68": 1401, "87CEA4": 1400, "88E765": 1360, "8B3295": 1350, "8DADBF": 1406, "922A4B": 1346, "927075": 1310, "9347C9": 1363, "93CA20": 1390, "93F454": 1374, "96628D": 1348, "96DCF3": 1460, "979BBF": 1373, "9A23FE": 1334, "9ADD1C": 1274, "9AEF0D": 1391, "9B389F": 1424, "9C327B": 1368, "9E3FC4": 1326, "9E93D4": 1308, "9EBB52": 1389, "9ED9B4": 1417, "9EDEDB": 1398, "9F01C2": 1346, "9FF7D4": 1347, "A4286D": 1353, "A6E424": 1351, "A8AC7D": 1380, "A981B6": 1378, "AB5077": 1383, "ABB0C2": 1396, "ACBDAB": 1332, "AE61F7": 1358, "B083DC": 1350, "B18B57": 1336, "B2C6DB": 1393, "B37EBC": 1388, "B3D2F6": 1425, "B46087": 1350, "B4D306": 1366, "B59B1E": 1428, "B63FE6": 1306, "B8E875": 1403, "BAF22D": 1334, "BC5618": 1394, "BC6640": 1420, "C18B92": 1345, "C23D83": 1398, "C252A4": 1378, "C3017B": 1306, "C3BF8F": 1368, "C446E0": 1409, "C483E1": 1345, "C659FD": 1417, "C67550": 1355, "C98BC8": 1368, "CA72C4": 1366, "CC5112": 1321, "CCBCB2": 1393, "CD7F77": 1418, "CE5E7D": 1388, "CF2B3C": 1456, "CF6085": 1343, "CFA765": 1439, "D0D1BF": 1378, "D5D471": 1418, "D5DE3F": 1341, "D5ECC8": 1344, "D622CF": 1443, "D7B7C2": 1307, "D8939D": 1331, "DA1018": 1362, "DB2E75": 1410, "DBB368": 1324, "DD37FD": 1361, "E02F80": 1400, "E1262D": 1403, "E186B4": 1423, "E3CBF8": 1349, "E4426F": 1358, "E87040": 1390, "E8E53F": 1404, "EB6BD1": 1288, "EBAD27": 1337, "EC2A6C": 1412, "ED4425": 1396, "ED722C": 1316, "ED9049": 1373, "EE94D3": 1379, "F26362": 1421, "F2BA8D": 1367, "F4119A": 1356, "F7CFFC": 1354, "F8A19D": 1383, "FA0731": 1345, "FA3E0B": 1340, "FA4305": 1335, "FABBFC": 1406, "FE4B28": 1347}
-[ RECORD 3 ]----+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
job_type         | policy_retention
jsonb_object_agg | {"00C681": 1410, "010A06": 1371, "01C016": 1356, "01C389": 1377, "035F25": 1345, "0465A8": 1351, "077EE7": 1361, "07890E": 1359, "09CEA3": 1381, "0AD10C": 1340, "0AF2CE": 1331, "0B27FD": 1306, "0B93E9": 1381, "13DB9E": 1340, "15E145": 1349, "1648D9": 1355, "17D3E9": 1334, "1822F2": 1319, "19EA66": 1344, "1C479A": 1335, "1C7B83": 1413, "1D474B": 1343, "1E7224": 1374, "1EB43D": 1373, "1ED1C5": 1343, "206A70": 1418, "20B881": 1357, "213845": 1348, "2179EA": 1329, "22BC6F": 1311, "2471AD": 1410, "255891": 1392, "258EA3": 1351, "26A528": 1375, "26D6ED": 1391, "271335": 1341, "288717": 1361, "28C3F1": 1406, "2AB937": 1389, "2B1FD8": 1385, "2C6728": 1401, "2D5565": 1307, "2DCE2E": 1362, "30C198": 1386, "3384C6": 1354, "358054": 1404, "36E167": 1344, "37276A": 1406, "39B057": 1392, "39CA17": 1380, "3B0EB2": 1406, "3E5839": 1378, "410059": 1345, "43626E": 1369, "43FF17": 1414, "452337": 1331, "47620E": 1441, "476B2E": 1331, "476FB4": 1414, "479D47": 1369, "485B9B": 1360, "48E447": 1402, "4AD26F": 1351, "4D575E": 1301, "4D6F4B": 1327, "4D79D3": 1393, "4E65AC": 1383, "4E792E": 1360, "4F8324": 1450, "506B13": 1354, "5099A6": 1338, "529EB2": 1392, "547E0E": 1326, "562B14": 1319, "571CE2": 1370, "589CFF": 1334, "5AB625": 1372, "5C9D3F": 1373, "5D3F7F": 1401, "5D5171": 1353, "5DD908": 1367, "60295C": 1374, "6040CB": 1383, "6187FD": 1341, "6762CF": 1297, "678481": 1408, "6940C3": 1372, "6992B3": 1356, "6AF53D": 1380, "6BF758": 1331, "6C1692": 1359, "6CB4B2": 1378, "6E32CC": 1287, "6EB9CD": 1353, "7147D9": 1404, "72267A": 1361, "7426E5": 1416, "75DDEE": 1337, "779633": 1329, "7A3B6A": 1337, "7B738C": 1350, "7BC4F1": 1359, "7C86B7": 1318, "7CC11A": 1371, "7CC1C9": 1305, "7DA29A": 1351, "7DFEFC": 1443, "81D6D9": 1349, "84109F": 1382, "8416C2": 1374, "84338D": 1348, "85E426": 1352, "877221": 1334, "87BD3E": 1312, "88C1DA": 1427, "88DD15": 1370, "88ED40": 1402, "89CECB": 1378, "8C16C1": 1360, "8C1DF1": 1286, "8D3A74": 1382, "8E305D": 1387, "8E3CCC": 1382, "8EC436": 1404, "8F3A61": 1409, "9242A3": 1355, "92A327": 1361, "92C62B": 1349, "94BD37": 1363, "96E413": 1378, "996525": 1407, "9B47FF": 1368, "A1C696": 1368, "A283DE": 1347, "A3CDAE": 1364, "A42DD3": 1357, "A4386F": 1446, "A49F1E": 1453, "A6D7A0": 1321, "A7D592": 1297, "A83E0C": 1417, "A9785F": 1383, "A99538": 1378, "A9FF8C": 1323, "AB495E": 1323, "AC620D": 1423, "AE1CCB": 1343, "B036FE": 1401, "B1FA7A": 1411, "B515AF": 1341, "B7A145": 1315, "B7EF25": 1338, "B8D32E": 1351, "B9AF4B": 1382, "BC6F7B": 1357, "BC8953": 1360, "BDB19F": 1371, "C2EA9C": 1361, "C32857": 1342, "C4CAED": 1428, "C4DBC7": 1348, "C6C543": 1371, "CAA19F": 1390, "CCAE11": 1305, "CCD827": 1371, "CD3BED": 1381, "CDCC86": 1425, "CF64C8": 1402, "CFB99D": 1395, "D19C05": 1344, "D22BC5": 1388, "D285A4": 1421, "D44356": 1429, "D464A9": 1396, "D6880D": 1377, "D814F7": 1346, "D8E57B": 1338, "D97CAD": 1346, "DB3947": 1377, "DD1F75": 1329, "DEA270": 1416, "DF6E09": 1355, "DF7E96": 1298, "E21991": 1454, "E4451B": 1381, "E44E27": 1391, "E83826": 1366, "ECA962": 1340, "EEA48E": 1331, "F2395D": 1350, "F2D9EB": 1426, "F3A719": 1363, "F4263B": 1371, "F4D463": 1335, "F8A12B": 1402, "F8A363": 1344, "FD32EB": 1388, "FE300B": 1450, "FF40C3": 1361, "FFE8C3": 1350}
-[ RECORD 4 ]----+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
job_type         | user_defined_action
jsonb_object_agg | {"006DD0": 1345, "010EE1": 1413, "016D42": 1319, "02609D": 1349, "047E3A": 1325, "056B65": 1338, "06AF53": 1330, "08A1D2": 1426, "09695D": 1373, "0A0BA9": 1472, "0A75E5": 1384, "0A947A": 1433, "0D1CF8": 1368, "0D4661": 1412, "0DA50D": 1327, "0DF265": 1440, "0E3A63": 1356, "0E89FF": 1374, "0EFEF3": 1392, "0F7EBD": 1389, "110E88": 1333, "116BFD": 1320, "118A36": 1293, "11A193": 1431, "11C484": 1360, "128316": 1375, "129901": 1378, "12DEC5": 1376, "138DD7": 1355, "1399F1": 1373, "13B3A4": 1353, "16A6C9": 1373, "17288E": 1369, "17327E": 1359, "17B741": 1391, "17FDEA": 1373, "18BFD4": 1354, "1932D3": 1376, "1AF209": 1373, "1B1D1B": 1375, "1C9BC8": 1340, "1CEE0A": 1385, "1CF482": 1394, "1D618A": 1325, "1E71E3": 1393, "1E72FA": 1406, "1EE1B1": 1404, "1F4F9C": 1409, "209FEE": 1345, "20A0DF": 1360, "212A09": 1289, "2143CF": 1383, "21A5CE": 1410, "248846": 1283, "251635": 1369, "252E35": 1354, "26DEFB": 1290, "26E654": 1366, "26FE1C": 1384, "26FF11": 1337, "27AB11": 1349, "27D1F2": 1344, "294C73": 1415, "2BC9CF": 1377, "2BF6BC": 1355, "2CB705": 1361, "2D3F23": 1377, "2DA39B": 1309, "2E09EF": 1372, "2EC1BB": 1397, "2F2EB6": 1395, "2F3599": 1390, "2F55A8": 1373, "30096C": 1403, "300D5D": 1381, "3197FF": 1335, "320861": 1357, "339522": 1368, "35B0B3": 1410, "3645E3": 1402, "380A73": 1375, "383D35": 1428, "396940": 1382, "39EB8C": 1362, "3B17AC": 1413, "3B2905": 1360, "3C6FDD": 1362, "3D9392": 1358, "3E25F5": 1369, "3F8A14": 1433, "410283": 1387, "4184BD": 1353, "4261E0": 1339, "4387B2": 1442, "43C1F5": 1345, "44D54E": 1407, "452834": 1326, "45333F": 1402, "45384D": 1409, "454C6D": 1263, "459F3A": 1462, "45DDEB": 1310, "46D483": 1407, "475BDD": 1387, "481CBB": 1413, "48A16F": 1375, "493972": 1362, "4B136F": 1407, "4B871D": 1365, "4BA869": 1327, "4C11D0": 1332, "4CF9B8": 1359, "4DE18D": 1325, "4EEE7E": 1334, "4F331A": 1385, "4FA773": 1434, "50412D": 1381, "509391": 1356, "52AF23": 1359, "53A751": 1386, "5418CA": 1341, "542BC9": 1350, "54525C": 1362, "54BAC0": 1418, "54C067": 1362, "54EAB8": 1328, "55388D": 1401, "56A100": 1354, "57F990": 1345, "582B66": 1327, "58FB06": 1314, "593521": 1388, "59F087": 1353, "5A4FA2": 1352, "5A74D5": 1373, "5A84E1": 1321, "5CA9AB": 1371, "5D2237": 1404, "5D9425": 1383, "5F3617": 1401, "5F3737": 1417, "5FF082": 1372, "5FF86C": 1353, "601237": 1388, "60FD3F": 1381, "618861": 1376, "63466B": 1330, "6355AA": 1405, "640F24": 1437, "64E254": 1364, "654062": 1318, "670FC5": 1360, "67B758": 1328, "67BAC0": 1367, "687B62": 1406, "68DFB8": 1410, "6A81A9": 1351, "6B7CA0": 1289, "6C716D": 1358, "6CA4E7": 1419, "6CEE2D": 1381, "6E03F1": 1398, "6E2967": 1378, "6F3F8A": 1380, "6F60CA": 1315, "6FAFB5": 1375, "70D4A7": 1354, "72E941": 1375, "72FB5A": 1333, "73E0F1": 1390, "742D17": 1408, "7517A3": 1391, "756E7B": 1405, "758B40": 1436, "7626FB": 1344, "762B44": 1398, "765AF6": 1353, "76691A": 1325, "76C536": 1344, "76C5AE": 1407, "77281D": 1366, "7750A3": 1421, "779295": 1335, "78070C": 1365, "78411A": 1388, "7849CD": 1326, "78AB6D": 1344, "78FF6B": 1344, "7A72F1": 1351, "7AF42F": 1339, "7B7375": 1312, "7B91A5": 1338, "7D6C2E": 1343, "7DA643": 1346, "7EE35F": 1373, "7EF411": 1373, "7F1854": 1373, "7F7F1E": 1353, "801CCA": 1359, "81EBB1": 1371, "82606F": 1313, "826EAB": 1361, "833D78": 1373, "845D65": 1396, "848CA3": 1402, "84ABBA": 1287, "8639F1": 1302, "868248": 1446, "86F9D1": 1343, "870699": 1349, "8716BB": 1370, "8748F5": 1334, "879B49": 1360, "87D8D4": 1304, "88373A": 1343, "88C651": 1361, "8AF4A3": 1380, "8D1C88": 1351, "8D3E21": 1343, "8D46A0": 1380, "8D4932": 1361, "8DDA87": 1346, "8E5D1A": 1294, "8EC7D2": 1450, "8F2722": 1362, "8F3E41": 1360, "8F94E7": 1384, "8FDE21": 1386, "90A849": 1415, "90F087": 1335, "914D0C": 1399, "924E9C": 1316, "92BA2B": 1388, "92D3C5": 1334, "92F358": 1382, "931C04": 1359, "932365": 1398, "93457B": 1391, "9401F7": 1365, "9571FA": 1406, "960F8A": 1382, "96CF4D": 1372, "973580": 1296, "985CEB": 1371, "98BEE2": 1298, "994C09": 1410, "99B693": 1352, "99FE65": 1328, "9A8B69": 1371, "9CA76A": 1313, "9DDF62": 1342, "9E4123": 1339, "9E45C2": 1360, "A08CC9": 1404, "A0AACF": 1373, "A0C928": 1363, "A12FE4": 1335, "A13102": 1330, "A1356C": 1356, "A4A5F7": 1390, "A5EF1E": 1360, "A697F3": 1354, "A732DC": 1350, "A9D8C3": 1392, "AA0DBE": 1366, "AAEC7D": 1416, "AB6000": 1299, "AC2978": 1351, "AC8E36": 1366, "ACAFBD": 1409, "AD4155": 1356, "AD6736": 1373, "AEA750": 1328, "B01BC6": 1374, "B063E9": 1442, "B0F878": 1297, "B10448": 1366, "B19E03": 1418, "B1E7C7": 1346, "B258E6": 1386, "B31017": 1442, "B387A9": 1417, "B4062C": 1413, "B406D1": 1411, "B40DB1": 1338, "B41B03": 1325, "B50CFB": 1345, "B53D65": 1342, "B56871": 1351, "B5EC6F": 1399, "B61AA7": 1327, "B61E61": 1326, "B7BBB3": 1318, "B7EED8": 1368, "B9D621": 1388, "B9F4A0": 1379, "BB36C7": 1375, "BB7D2A": 1380, "BC0A03": 1365, "BC7BA9": 1400, "BC7FFF": 1385, "BCD0E5": 1374, "BCE784": 1389, "BD5F3E": 1358, "BDD3CA": 1422, "BDEA32": 1305, "BF4FC9": 1394, "C17183": 1437, "C29665": 1387, "C2E788": 1308, "C3E367": 1350, "C466C6": 1367, "C4B731": 1313, "C56066": 1373, "C6FB27": 1365, "C70268": 1318, "C72B94": 1410, "C7AA2E": 1444, "C81927": 1350, "C854B5": 1340, "C89162": 1363, "C8977F": 1312, "C91072": 1325, "C9951A": 1377, "CA11FB": 1414, "CA65DE": 1372, "CD237C": 1392, "CD86B4": 1315, "CDA5AD": 1355, "CDD215": 1325, "CDE0FE": 1409, "CEF38D": 1334, "D03897": 1284, "D0A0D1": 1327, "D22558": 1404, "D25155": 1328, "D28A47": 1380, "D445DC": 1363, "D46A8B": 1402, "D49379": 1410, "D50D92": 1321, "D58B6C": 1408, "D5FF22": 1329, "D60BD6": 1346, "D6ACC2": 1320, "D97EB4": 1386, "DA8EB8": 1368, "DB9DBE": 1390, "DBF70C": 1395, "DE0608": 1341, "DEB877": 1353, "DF5BD5": 1339, "E11372": 1360, "E1573B": 1394, "E172BC": 1352, "E1DB49": 1417, "E29091": 1434, "E2F3B7": 1347, "E3C37D": 1389, "E3E806": 1391, "E3F0BE": 1340, "E4B4E1": 1382, "E567C1": 1367, "E5738A": 1327, "E581C2": 1338, "E70499": 1354, "E7CE02": 1302, "E85A86": 1370, "E8D0C6": 1390, "E8D695": 1359, "E982B3": 1322, "E9FB22": 1342, "EA7987": 1454, "EC543B": 1347, "EC5E3C": 1407, "ECFA23": 1379, "ED1FB2": 1323, "EDC84C": 1348, "EE2248": 1376, "EF1386": 1242, "EF969F": 1346, "EF97EC": 1377, "EFEA34": 1389, "F225B1": 1348, "F4B635": 1364, "F5CB5F": 1394, "F60F76": 1350, "F61EED": 1389, "F66A35": 1364, "F6A08F": 1419, "F770BA": 1393, "F893CC": 1480, "F8A99C": 1452, "F9B725": 1355, "FB7798": 1378, "FBECC5": 1301, "FC375A": 1346, "FF1DF0": 1373, "FF7055": 1371, "FFDF23": 1384}

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from 46f9bd3 to bffe462 Compare October 20, 2022 08:04
@konskov konskov force-pushed the telemetry_job_stats branch 3 times, most recently from 6b1d9d5 to 9ac87e4 Compare October 24, 2022 14:23
@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from 970eb3b to 0745da2 Compare November 2, 2022 18:47
MemoryContext old_context = CurrentMemoryContext, spi_context;

const char *command_string =
"SELECT "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cant we do SET search_path TO pg_catalog, pg_temp here and then run the query. Would make the query clearer and also safeguard against future non-qualified references in the query

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had tried that suggestion initially but ran into some issues with the tests so did it like this eventually. I see your point though, I will try to do SET search_path instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

-[ RECORD 1 ]-----------+--------------------------------
job_id | 1000
last_start | Fri Dec 31 16:00:00.05 1999 PST
last_finish | Fri Dec 31 16:00:00.05 1999 PST
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wont this introduce flakyness on slower ci environments when the job cant be finished in those 0.05 seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, because in those tests we use a virtual timer that advances when mock_wait is called, and the setting for mock_wait in this case is WAIT_ON_JOB (

case WAIT_ON_JOB:
)
The handle on which we wait is the handle of the last registered job, in this case 1000, so the job will complete first before advancing the timer.

@konskov konskov force-pushed the telemetry_job_stats branch 2 times, most recently from edcd9d6 to 8da38a9 Compare November 3, 2022 10:41
This patch adds two new fields to the telemetry report,
`stats_by_job_type` and `errors_by_sqlerrcode`. Both report results
grouped by job type (different types of policies or
user defined action).
The patch also adds a new field to the `bgw_job_stats` table,
`total_duration_errors` to separate the duration of the failed runs
from the duration of successful ones.
@konskov konskov merged commit c54cf3e into timescale:main Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants