From 106f2eb664bbd38c83090becff9fcde1e9622c9c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 7 Apr 2019 10:31:32 +0200 Subject: [PATCH] Cast pg_stat_progress_cluster.cluster_index_relid to oid It's tracked internally as bigint, but when presented to the user it should be oid. --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/catalog/system_views.sql | 2 +- src/include/catalog/catversion.h | 2 +- src/test/regress/expected/rules.out | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index b946e13fdc..c5853da7af 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3937,7 +3937,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, cluster_index_relid - bigint + oid If the table is being scanned using an index, this is the OID of the index being used; otherwise, it is zero. diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql index 72f786d6f8..17e7aef220 100644 --- a/src/backend/catalog/system_views.sql +++ b/src/backend/catalog/system_views.sql @@ -933,7 +933,7 @@ CREATE VIEW pg_stat_progress_cluster AS WHEN 6 THEN 'rebuilding index' WHEN 7 THEN 'performing final cleanup' END AS phase, - S.param3 AS cluster_index_relid, + CAST(S.param3 AS oid) AS cluster_index_relid, S.param4 AS heap_tuples_scanned, S.param5 AS heap_tuples_written, S.param6 AS heap_blks_total, diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index bfd2bfc186..dcb7cce1e5 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 201904051 +#define CATALOG_VERSION_NO 201904071 #endif diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index bf7fca54ee..22d462f1e5 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -1855,7 +1855,7 @@ pg_stat_progress_cluster| SELECT s.pid, WHEN 7 THEN 'performing final cleanup'::text ELSE NULL::text END AS phase, - s.param3 AS cluster_index_relid, + (s.param3)::oid AS cluster_index_relid, s.param4 AS heap_tuples_scanned, s.param5 AS heap_tuples_written, s.param6 AS heap_blks_total, -- 2.40.0