Skip to content

Commit be39d88

Browse files
committed
Add regression test coverage for contrib/pg_buffercache.
We can't check the output of this view very closely without creating portability headaches, but we can make sure that the number of rows is as-expected. In any case, this is sufficient to exercise all the C code within, which is a lot better than the 0% coverage we had before. DongWook Lee Discussion: https://postgr.es/m/CAAcByaLCHGJB7qAENEcx9D09UL=w4ma+yijwF_-1MSqQZ9wK6Q@mail.gmail.com
1 parent d8e34fa commit be39d88

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
ifdef USE_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+
select count(*) = (select setting::bigint
4+
from pg_settings
5+
where name = 'shared_buffers')
6+
from pg_buffercache;

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