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

Commit2ad36ba

Browse files
[PGPRO-9336] Fix of isolation tests and beautify makefile
1 parentb6e5430 commit2ad36ba

9 files changed

+741
-1591
lines changed

‎.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,3 @@ env:
3535
-PG_VERSION=13 LEVEL=hardcore
3636
-PG_VERSION=12
3737
-PG_VERSION=12 LEVEL=hardcore
38-
-PG_VERSION=11
39-
-PG_VERSION=11 LEVEL=hardcore
40-
41-
matrix:
42-
allow_failures:
43-
-env:PG_VERSION=11
44-
-env:PG_VERSION=11 LEVEL=hardcore

‎Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,20 @@ REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_ha
3030

3131
TAP_TESTS = 1
3232

33+
ISOLATION = predicate-rum predicate-rum-2
34+
ISOLATION_OPTS = --load-extension=rum
3335
EXTRA_CLEAN = pglist_tmp
3436

3537
ifdefUSE_PGXS
38+
39+
# We cannot run isolation test for versions 12,13 in PGXS case
40+
# because 'pg_isolation_regress' is not copied to install
41+
# directory, see src/test/isolation/Makefile
42+
ifeq ($(MAJORVERSION),$(filter 12% 13%,$(MAJORVERSION)))
43+
undefineISOLATION
44+
undefineISOLATION_OPTS
45+
endif
46+
3647
PG_CONFIG = pg_config
3748
PGXS :=$(shell$(PG_CONFIG) --pgxs)
3849
include$(PGXS)
@@ -60,6 +71,11 @@ wal-check: temp-install
6071
check: wal-check
6172
endif
6273

74+
#
75+
# Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
76+
#
77+
ifeq ($(MAJORVERSION),$(filter 9.6% 10% 11%,$(MAJORVERSION)))
78+
6379
install: installincludes
6480

6581
installincludes:
@@ -83,3 +99,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
8399
$(pg_isolation_regress_check)\
84100
--temp-config$(top_srcdir)/contrib/rum/logical.conf\
85101
$(ISOLATIONCHECKS)
102+
endif

‎expected/predicate-rum-2.out

Lines changed: 340 additions & 260 deletions
Large diffs are not rendered by default.

‎expected/predicate-rum-2_1.out

Lines changed: 0 additions & 501 deletions
This file was deleted.

‎expected/predicate-rum.out

Lines changed: 342 additions & 280 deletions
Large diffs are not rendered by default.

‎expected/predicate-rum_1.out

Lines changed: 0 additions & 521 deletions
This file was deleted.

‎meson.build

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ rum_sources = files(
2424
if host_system=='windows'
2525
rum_sources+= rc_lib_gen.process(win32ver_rc,extra_args: [
2626
'--NAME','rum',
27-
'--FILEDESC','rum - providesaccess method to work with the RUM indexes.',])
27+
'--FILEDESC','RUM indexaccess method',])
2828
endif
2929

3030
rum=shared_module('rum',
@@ -87,10 +87,22 @@ tests += {
8787
'expr',
8888
'array',
8989
],
90+
'regress_args': [
91+
'--temp-config',files('logical.conf')
92+
],
9093
},
9194
'tap': {
9295
'tests': [
9396
't/001_wal.pl',
9497
],
9598
},
96-
}
99+
'isolation': {
100+
'specs': [
101+
'predicate-rum',
102+
'predicate-rum-2',
103+
],
104+
'regress_args': [
105+
'--temp-config',files('logical.conf'),
106+
],
107+
},
108+
}

‎specs/predicate-rum-2.spec

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@
66

77
setup
88
{
9-
CREATEEXTENSIONrum;
10-
119
CREATETABLErum_tbl (idserial,tsvtsvector);
1210

1311
CREATETABLEtext_table (id1serial,ttext[]);
1412

15-
SELECTSETSEED(0.5);
16-
1713
INSERTINTOtext_table(t)SELECTarray[chr(i)||chr(j)]FROMgenerate_series(65,90)i,
1814
generate_series(65,90)j ;
1915

20-
INSERTINTOrum_tbl(tsv)SELECTto_tsvector('simple',t[1] )FROMtext_table;
21-
16+
--Weneedtousepseudorandomtogeneratevaluesfortesttable
17+
--Inthiscaseweuselinearcongruentialgeneratorbecauserandom()
18+
--functionmaygeneratedifferentoutputswithdifferentsystems
2219
DO $$
20+
DECLARE
21+
cinteger:=17;
22+
ainteger:=261;
23+
minteger:=6760;
24+
Xiinteger:=228;
2325
BEGIN
24-
FORjin1..10LOOP
25-
UPDATErum_tblSETtsv=tsv||q.t1FROM (SELECTid1,to_tsvector('simple',t[1] )
26-
ast1FROMtext_table)asqWHEREid= (random()*q.id1)::integer;
26+
FORiin1..338LOOP
27+
INSERTINTOrum_tbl(tsv)VALUES ('');
28+
FORjin1..10LOOP
29+
UPDATErum_tblSETtsv=tsv|| (SELECTto_tsvector(t[1])FROMtext_tableWHEREid1=Xi%676+1)WHEREid=i;
30+
Xi= (a*Xi+c)%m;
31+
ENDLOOP;
2732
ENDLOOP;
2833
END;
2934
$$;
@@ -35,7 +40,6 @@ teardown
3540
{
3641
DROPTABLEtext_table;
3742
DROPTABLErum_tbl;
38-
DROPEXTENSIONrum;
3943
}
4044

4145
session"s1"

‎specs/predicate-rum.spec

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@
66

77
setup
88
{
9-
CREATEEXTENSIONrum;
10-
119
CREATETABLErum_tbl (idserial,tsvtsvector);
1210

1311
CREATETABLEtext_table (id1serial,ttext[]);
1412

15-
SELECTSETSEED(0.5);
16-
1713
INSERTINTOtext_table(t)SELECTarray[chr(i)||chr(j)]FROMgenerate_series(65,90)i,
1814
generate_series(65,90)j ;
1915

20-
INSERTINTOrum_tbl(tsv)SELECTto_tsvector('simple',t[1] )FROMtext_table;
21-
16+
--Weneedtousepseudorandomtogeneratevaluesfortesttable
17+
--Inthiscaseweuselinearcongruentialgeneratorbecauserandom()
18+
--functionmaygeneratedifferentoutputswithdifferentsystems
2219
DO $$
20+
DECLARE
21+
cinteger:=17;
22+
ainteger:=261;
23+
minteger:=6760;
24+
Xiinteger:=228;
2325
BEGIN
24-
FORjin1..10LOOP
25-
UPDATErum_tblSETtsv=tsv||q.t1FROM (SELECTid1,to_tsvector('simple',t[1] )
26-
ast1FROMtext_table)asqWHEREid= (random()*q.id1)::integer;
26+
FORiin1..338LOOP
27+
INSERTINTOrum_tbl(tsv)VALUES ('');
28+
FORjin1..10LOOP
29+
UPDATErum_tblSETtsv=tsv|| (SELECTto_tsvector(t[1])FROMtext_tableWHEREid1=Xi%676+1)WHEREid=i;
30+
Xi= (a*Xi+c)%m;
31+
ENDLOOP;
2732
ENDLOOP;
2833
END;
2934
$$;
@@ -35,7 +40,6 @@ teardown
3540
{
3641
DROPTABLEtext_table;
3742
DROPTABLErum_tbl;
38-
DROPEXTENSIONrum;
3943
}
4044

4145
session"s1"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp