Add regression test for pg_backend_memory_contexts.

Author: Atsushi Torikoshi
Reviewed-by: Michael Paquier, Fujii Masao
Discussion: https://postgr.es/m/20200819135545.GC19121@paquier.xyz
This commit is contained in:
Fujii Masao 2020-08-26 10:52:02 +09:00
parent 50db5964ee
commit adc8fc6167
2 changed files with 14 additions and 0 deletions

View File

@ -19,6 +19,15 @@ select count(*) >= 0 as ok from pg_available_extensions;
t
(1 row)
-- The entire output of pg_backend_memory_contexts is not stable,
-- we test only the existance and basic condition of TopMemoryContext.
select name, ident, parent, level, total_bytes >= free_bytes
from pg_backend_memory_contexts where level = 0;
name | ident | parent | level | ?column?
------------------+-------+--------+-------+----------
TopMemoryContext | | | 0 | t
(1 row)
-- At introduction, pg_config had 23 entries; it may grow
select count(*) > 20 as ok from pg_config;
ok

View File

@ -12,6 +12,11 @@ select count(*) >= 0 as ok from pg_available_extension_versions;
select count(*) >= 0 as ok from pg_available_extensions;
-- The entire output of pg_backend_memory_contexts is not stable,
-- we test only the existance and basic condition of TopMemoryContext.
select name, ident, parent, level, total_bytes >= free_bytes
from pg_backend_memory_contexts where level = 0;
-- At introduction, pg_config had 23 entries; it may grow
select count(*) > 20 as ok from pg_config;