]> granicus.if.org Git - postgresql/commitdiff
Cast pg_stat_progress_cluster.cluster_index_relid to oid
authorPeter Eisentraut <peter@eisentraut.org>
Sun, 7 Apr 2019 08:31:32 +0000 (10:31 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sun, 7 Apr 2019 08:31:32 +0000 (10:31 +0200)
It's tracked internally as bigint, but when presented to the user it
should be oid.

doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/include/catalog/catversion.h
src/test/regress/expected/rules.out

index b946e13fdc377efe5343d1edc65a1fe0f2fa3eb8..c5853da7af07bb0c40d0b26e8f715645ba909c04 100644 (file)
@@ -3937,7 +3937,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
     </row>
     <row>
      <entry><structfield>cluster_index_relid</structfield></entry>
-     <entry><type>bigint</type></entry>
+     <entry><type>oid</type></entry>
      <entry>
        If the table is being scanned using an index, this is the OID of the
        index being used; otherwise, it is zero.
index 72f786d6f8ad06a0806201246e0a4c5a14c92682..17e7aef2204d8ad08773d5b2209586b705dea114 100644 (file)
@@ -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,
index bfd2bfc186c9c131a04181434f5bd889820dd3cd..dcb7cce1e53174aa9ccf6d609d4ff4c251d9770c 100644 (file)
@@ -53,6 +53,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     201904051
+#define CATALOG_VERSION_NO     201904071
 
 #endif
index bf7fca54ee42597a4ae5a34173a38c900bf3dbc3..22d462f1e5f516a873cdef6d73753dca912517eb 100644 (file)
@@ -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,