summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-04-21 07:21:50 +0900
committerMichael Paquier <michael@paquier.xyz>2023-04-21 07:21:50 +0900
commit0ecb87e1fa07a733494e35636e55807b0f3fc1ed (patch)
tree958227cf546cbf36d6e6791866785cef1c49ddb6 /contrib
parenteab2d3147e3c13aca4a9aca52c0a9a581a8d224a (diff)
downloadpostgresql-0ecb87e1fa07a733494e35636e55807b0f3fc1ed.tar.gz
Remove io prefix from pg_stat_io columns
a9c70b46 added the statistics view pg_stat_io which contained columns "io_context" and "io_object". Given that the columns are in the pg_stat_io view, the "io" prefix is somewhat redundant, so remove it. The code variables referring to these fields are kept unchanged so as they can keep their context about I/O. Bump catalog version. Author: Melanie Plageman Reviewed-by: Kyotaro Horiguchi, Fabrízio de Royes Mello Discussion: https://postgr.es/m/CAAKRu_aAQoJWrvT2BYYQvJChFKra_O-5ra3jhzKJZqWsTR1CPQ@mail.gmail.com
Diffstat (limited to 'contrib')
-rw-r--r--contrib/amcheck/expected/check_heap.out4
-rw-r--r--contrib/amcheck/sql/check_heap.sql4
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/amcheck/expected/check_heap.out b/contrib/amcheck/expected/check_heap.out
index e4785141a6..8f1beb4681 100644
--- a/contrib/amcheck/expected/check_heap.out
+++ b/contrib/amcheck/expected/check_heap.out
@@ -80,7 +80,7 @@ INSERT INTO heaptest (a, b)
SET allow_in_place_tablespaces = true;
CREATE TABLESPACE regress_test_stats_tblspc LOCATION '';
SELECT sum(reads) AS stats_bulkreads_before
- FROM pg_stat_io WHERE io_context = 'bulkread' \gset
+ FROM pg_stat_io WHERE context = 'bulkread' \gset
ALTER TABLE heaptest SET TABLESPACE regress_test_stats_tblspc;
-- Check that valid options are not rejected nor corruption reported
-- for a non-empty table
@@ -114,7 +114,7 @@ SELECT pg_stat_force_next_flush();
(1 row)
SELECT sum(reads) AS stats_bulkreads_after
- FROM pg_stat_io WHERE io_context = 'bulkread' \gset
+ FROM pg_stat_io WHERE context = 'bulkread' \gset
SELECT :stats_bulkreads_after > :stats_bulkreads_before;
?column?
----------
diff --git a/contrib/amcheck/sql/check_heap.sql b/contrib/amcheck/sql/check_heap.sql
index 6794ca4eb0..cf5ce4d0c0 100644
--- a/contrib/amcheck/sql/check_heap.sql
+++ b/contrib/amcheck/sql/check_heap.sql
@@ -40,7 +40,7 @@ INSERT INTO heaptest (a, b)
SET allow_in_place_tablespaces = true;
CREATE TABLESPACE regress_test_stats_tblspc LOCATION '';
SELECT sum(reads) AS stats_bulkreads_before
- FROM pg_stat_io WHERE io_context = 'bulkread' \gset
+ FROM pg_stat_io WHERE context = 'bulkread' \gset
ALTER TABLE heaptest SET TABLESPACE regress_test_stats_tblspc;
-- Check that valid options are not rejected nor corruption reported
@@ -55,7 +55,7 @@ SELECT * FROM verify_heapam(relation := 'heaptest', startblock := 0, endblock :=
-- causing an additional bulkread, which should be reflected in pg_stat_io.
SELECT pg_stat_force_next_flush();
SELECT sum(reads) AS stats_bulkreads_after
- FROM pg_stat_io WHERE io_context = 'bulkread' \gset
+ FROM pg_stat_io WHERE context = 'bulkread' \gset
SELECT :stats_bulkreads_after > :stats_bulkreads_before;
CREATE ROLE regress_heaptest_role;