• R/O
  • HTTP
  • SSH
  • HTTPS

pg_bigm: Commit

This is the main pg_bigm git repository.


Commit MetaInfo

Revisão5011a694b234bfb159b8dc9e416928890eeeef55 (tree)
Hora2020-02-15 23:36:03
AutorMasaoFujii <masao.fujii@gmai...>
CommiterMasaoFujii

Mensagem de Log

Stabilize the result of pg_gin_pending_stats() regression test.

Previously pg_bigm regression test checked the value of pages column
that pg_gin_pending_stats() returns. But this value could vary from
block size to block size in PostgreSQL server. This leaded to
unexpected failure of regression test on PostgreSQL built with
non-default block size.

To avoid this issue, this patch gets rid of the check for pages column
from the regression test, to stabilize the result of test whatever
block size is used. The value of pages column that
pg_gin_pending_stats() is calculated in PostgreSQL server side,
so there is no strong reason why pg_bigm regression test needs to
verify the value and we determined that it's ok to get rid of that
check.

Back-patch to pg_bigm 1.1 where regression test for
pg_gin_pending_stats() was added.

Author: Torikoshi Atsushi
Reviewed-by: Fujii Masao
Discussion: https://osdn.net/projects/pgbigm/lists/archive/hackers/2020-February/000331.html

Mudança Sumário

Diff

--- a/expected/pg_bigm.out
+++ b/expected/pg_bigm.out
@@ -101,10 +101,13 @@ CREATE INDEX test_bigm_idx ON test_bigm
101101 USING gin (col1 gin_bigm_ops, col2 gin_bigm_ops);
102102 \copy test_bigm from 'data/bigm.csv' with csv
103103 -- tests pg_gin_pending_stats
104-SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
105- pages | tuples
106--------+--------
107- 43 | 249
104+-- exclude pages column from the return values of only this call of
105+-- pg_gin_pending_stats(), in order to stabilize the result of
106+-- this regression test whatever block size is used in PostgreSQL server.
107+SELECT tuples FROM pg_gin_pending_stats('test_bigm_idx');
108+ tuples
109+--------
110+ 249
108111 (1 row)
109112
110113 VACUUM;
--- a/sql/pg_bigm.sql
+++ b/sql/pg_bigm.sql
@@ -38,7 +38,11 @@ CREATE INDEX test_bigm_idx ON test_bigm
3838 \copy test_bigm from 'data/bigm.csv' with csv
3939
4040 -- tests pg_gin_pending_stats
41-SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
41+
42+-- exclude pages column from the return values of only this call of
43+-- pg_gin_pending_stats(), in order to stabilize the result of
44+-- this regression test whatever block size is used in PostgreSQL server.
45+SELECT tuples FROM pg_gin_pending_stats('test_bigm_idx');
4246 VACUUM;
4347 SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
4448 SELECT * FROM pg_gin_pending_stats('test_bigm');
Show on old repository browser