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

Commitbe39d88

Browse files
committed
Add regression test coverage for contrib/pg_buffercache.
We can't check the output of this view very closely withoutcreating portability headaches, but we can make sure thatthe number of rows is as-expected. In any case, this issufficient to exercise all the C code within, which is alot better than the 0% coverage we had before.DongWook LeeDiscussion:https://postgr.es/m/CAAcByaLCHGJB7qAENEcx9D09UL=w4ma+yijwF_-1MSqQZ9wK6Q@mail.gmail.com
1 parentd8e34fa commitbe39d88

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

‎contrib/pg_buffercache/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Generated subdirectories
2+
/log/
3+
/results/
4+
/tmp_check/

‎contrib/pg_buffercache/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ DATA = pg_buffercache--1.2.sql pg_buffercache--1.2--1.3.sql \
1010
pg_buffercache--1.1--1.2.sql pg_buffercache--1.0--1.1.sql
1111
PGFILEDESC = "pg_buffercache - monitoring of shared buffer cache in real-time"
1212

13+
REGRESS = pg_buffercache
14+
1315
ifdefUSE_PGXS
1416
PG_CONFIG = pg_config
1517
PGXS :=$(shell$(PG_CONFIG) --pgxs)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CREATE EXTENSION pg_buffercache;
2+
select count(*) = (select setting::bigint
3+
from pg_settings
4+
where name = 'shared_buffers')
5+
from pg_buffercache;
6+
?column?
7+
----------
8+
t
9+
(1 row)
10+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CREATE EXTENSION pg_buffercache;
2+
3+
selectcount(*)= (select setting::bigint
4+
from pg_settings
5+
where name='shared_buffers')
6+
from pg_buffercache;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp