• R/O
  • HTTP
  • SSH
  • HTTPS

pg_bigm: Commit

This is the main pg_bigm git repository.


Commit MetaInfo

Revisão0899dcc269d6b285c87c368ffd424aa91ffecde8 (tree)
Hora2020-02-15 23:35:52
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
@@ -103,10 +103,13 @@ CREATE INDEX test_bigm_idx ON test_bigm
103103 USING gin (col1 gin_bigm_ops, col2 gin_bigm_ops);
104104 \copy test_bigm from 'data/bigm.csv' with csv
105105 -- tests pg_gin_pending_stats
106-SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
107- pages | tuples
108--------+--------
109- 43 | 249
106+-- exclude pages column from the return values of only this call of
107+-- pg_gin_pending_stats(), in order to stabilize the result of
108+-- this regression test whatever block size is used in PostgreSQL server.
109+SELECT tuples FROM pg_gin_pending_stats('test_bigm_idx');
110+ tuples
111+--------
112+ 249
110113 (1 row)
111114
112115 VACUUM;
--- a/sql/pg_bigm.sql
+++ b/sql/pg_bigm.sql
@@ -41,7 +41,11 @@ CREATE INDEX test_bigm_idx ON test_bigm
4141 \copy test_bigm from 'data/bigm.csv' with csv
4242
4343 -- tests pg_gin_pending_stats
44-SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
44+
45+-- exclude pages column from the return values of only this call of
46+-- pg_gin_pending_stats(), in order to stabilize the result of
47+-- this regression test whatever block size is used in PostgreSQL server.
48+SELECT tuples FROM pg_gin_pending_stats('test_bigm_idx');
4549 VACUUM;
4650 SELECT * FROM pg_gin_pending_stats('test_bigm_idx');
4751 SELECT * FROM pg_gin_pending_stats('test_bigm');
Show on old repository browser