Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitadc8fc6

Browse files
committed
Add regression test for pg_backend_memory_contexts.
Author: Atsushi TorikoshiReviewed-by: Michael Paquier, Fujii MasaoDiscussion:https://postgr.es/m/20200819135545.GC19121@paquier.xyz
1 parent50db596 commitadc8fc6

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
selectcount(*)>=0as okfrom 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_contextswhere level=0;
19+
1520
-- At introduction, pg_config had 23 entries; it may grow
1621
selectcount(*)>20as okfrom pg_config;
1722

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp