Skip to content

Commit adc8fc6

Browse files
committed
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
1 parent 50db596 commit adc8fc6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/regress/expected/sysviews.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ select count(*) >= 0 as ok from pg_available_extensions;
1919
t
2020
(1 row)
2121

22+
-- The entire output of pg_backend_memory_contexts is not stable,
23+
-- we test only the existance and basic condition of TopMemoryContext.
24+
select name, ident, parent, level, total_bytes >= free_bytes
25+
from pg_backend_memory_contexts where level = 0;
26+
name | ident | parent | level | ?column?
27+
------------------+-------+--------+-------+----------
28+
TopMemoryContext | | | 0 | t
29+
(1 row)
30+
2231
-- At introduction, pg_config had 23 entries; it may grow
2332
select count(*) > 20 as ok from pg_config;
2433
ok

src/test/regress/sql/sysviews.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ select count(*) >= 0 as ok from pg_available_extension_versions;
1212

1313
select count(*) >= 0 as ok from pg_available_extensions;
1414

15+
-- The entire output of pg_backend_memory_contexts is not stable,
16+
-- we test only the existance and basic condition of TopMemoryContext.
17+
select name, ident, parent, level, total_bytes >= free_bytes
18+
from pg_backend_memory_contexts where level = 0;
19+
1520
-- At introduction, pg_config had 23 entries; it may grow
1621
select count(*) > 20 as ok from pg_config;
1722

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy