Skip to content

Commit 05494f7

Browse files
committed
[*] deprecate reco_add_index for pre-v2 pg_qual_stats
1 parent b5ac9ea commit 05494f7

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

internal/metrics/metrics.yaml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,29 +1309,6 @@ metrics:
13091309
- '*'
13101310
is_instance_level: true
13111311
reco_add_index:
1312-
init_sql: CREATE EXTENSION IF NOT EXISTS pg_qualstats;
1313-
sqls:
1314-
11: |-
1315-
/* assumes the pg_qualstats extension and superuser or select grants on pg_qualstats_indexes_ddl view */
1316-
select /* pgwatch_generated */
1317-
(extract(epoch from now()) * 1e9)::int8 as epoch_ns,
1318-
'create_index'::text as tag_reco_topic,
1319-
quote_ident(nspname::text)||'.'||quote_ident(relid::text) as tag_object_name,
1320-
ddl as recommendation,
1321-
('qual execution count: '|| execution_count)::text as extra_info
1322-
from
1323-
pg_qualstats_indexes_ddl
1324-
order by
1325-
execution_count desc
1326-
limit 25
1327-
node_status: primary
1328-
extension_version_based_overrides:
1329-
- target_metric: reco_add_index_ext_qualstats_2.0
1330-
expected_extension_versions:
1331-
- ext_name: pg_qualstats
1332-
ext_min_version: "2.0"
1333-
reco_add_index_ext_qualstats_2.0:
1334-
init_sql: CREATE EXTENSION IF NOT EXISTS pg_qualstats;
13351312
sqls:
13361313
11: |-
13371314
/* assumes the pg_qualstats extension and superuser or select grant on pg_qualstats_index_advisor() function */
@@ -1391,7 +1368,6 @@ metrics:
13911368
tgenabled = 'D'
13921369
node_status: primary
13931370
reco_drop_index:
1394-
init_sql: CREATE EXTENSION IF NOT EXISTS pg_qualstats;
13951371
sqls:
13961372
11: |
13971373
/* assumes the pg_qualstats extension */
@@ -1547,6 +1523,7 @@ metrics:
15471523
q_su.count >= 10
15481524
node_status: primary
15491525
recommendations:
1526+
init_sql: CREATE EXTENSION IF NOT EXISTS pg_qualstats;
15501527
sqls:
15511528
11: /* dummy placeholder - special handling in code to collect other metrics named reco_* */
15521529
replication:

0 commit comments

Comments
 (0)