Fixes and formatting

pull/463/head
Artem Gavrilov 2024-06-06 15:57:47 +02:00
parent fd8864dba3
commit 122a30c82b
3 changed files with 113 additions and 112 deletions

View File

@ -2082,8 +2082,9 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
expected_columns = PG_STAT_MONITOR_COLS_V2_1;
break;
default:
// TODO error?
break;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("[pg_stat_monitor] pg_stat_monitor_internal: Unknown API version")));
}
/* Disallow old api usage */

View File

@ -83,7 +83,7 @@ if ($PGSM::PG_MAJOR_VERSION >= 17)
trim($stdout);
is($stdout,'t',"Check: local_blks_hit should not be 0.");
# TODO: Find a way how to bypass cache and ger real block reads
# TODO: Find a way how to bypass cache and get real block reads
# if ($PGSM::PG_MAJOR_VERSION >= 17)
# {
# ($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT SUM(PGSM.local_blk_read_time) != 0 FROM pg_stat_monitor AS PGSM WHERE PGSM.query LIKE \'%FROM t1%\';', extra_params => ['-Pformat=unaligned','-Ptuples_only=on']);