• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisioncbe257d9f599aaf64b4f565a2f4ce018c868f21a (tree)
Time2020-02-20 20:53:24
AuthorKyotaro Horiguchi <horikyota.ntt@gmai...>
CommiterKyotaro Horiguchi

Log Message

Support PG12.

As the prepparation for making PG12 branch, change PG version to 12
and adjust for the latest PG12.

Change Summary

Incremental Difference

--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,8 @@ PG_CONFIG = pg_config
2222 PGXS := $(shell $(PG_CONFIG) --pgxs)
2323 include $(PGXS)
2424
25-STARBALL11 = pg_hint_plan11-$(HINTPLANVER).tar.gz
26-STARBALLS = $(STARBALL11)
25+STARBALL12 = pg_hint_plan12-$(HINTPLANVER).tar.gz
26+STARBALLS = $(STARBALL12)
2727
2828 TARSOURCES = Makefile *.c *.h COPYRIGHT* \
2929 pg_hint_plan--*.sql \
@@ -37,7 +37,7 @@ endif
3737
3838 installcheck: $(REGRESSION_EXPECTED)
3939
40-rpms: rpm11
40+rpms: rpm12
4141
4242 # pg_hint_plan.c includes core.c and make_join_rel.c
4343 pg_hint_plan.o: core.c make_join_rel.c # pg_stat_statements.c
@@ -52,7 +52,7 @@ $(STARBALLS): $(TARSOURCES)
5252 tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^)
5353 rm $(subst .tar.gz,,$@)
5454
55-rpm11: $(STARBALL11)
56- MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan11.spec
55+rpm12: $(STARBALL12)
56+ MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan12.spec
5757
5858
--- a/SPECS/pg_hint_plan11.spec
+++ b/SPECS/pg_hint_plan12.spec
@@ -1,7 +1,7 @@
11 # SPEC file for pg_store_plans
22 # Copyright(C) 2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
33
4-%define _pgdir /usr/pgsql-11
4+%define _pgdir /usr/pgsql-12
55 %define _bindir %{_pgdir}/bin
66 %define _libdir %{_pgdir}/lib
77 %define _datadir %{_pgdir}/share
@@ -14,8 +14,8 @@
1414 %endif
1515
1616 ## Set general information for pg_store_plans.
17-Summary: Optimizer hint on PostgreSQL 11
18-Name: pg_hint_plan11
17+Summary: Optimizer hint on PostgreSQL 12
18+Name: pg_hint_plan12
1919 Version: 1.3.4
2020 Release: 1%{?dist}
2121 License: BSD
@@ -26,8 +26,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
2626 Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
2727
2828 ## We use postgresql-devel package
29-BuildRequires: postgresql11-devel
30-Requires: postgresql11-server
29+BuildRequires: postgresql12-devel
30+Requires: postgresql12-server
3131
3232 ## Description for "pg_hint_plan"
3333 %description
@@ -35,19 +35,19 @@ Requires: postgresql11-server
3535 pg_hint_plan provides capability to tweak execution plans to be
3636 executed on PostgreSQL.
3737
38-Note that this package is available for only PostgreSQL 11.
38+Note that this package is available for only PostgreSQL 12.
3939
4040 %package llvmjit
41-Requires: postgresql11-server, postgresql11-llvmjit
42-Requires: pg_hint_plan11 = 1.3.4
43-Summary: Just-in-time compilation support for pg_hint_plan11
41+Requires: postgresql12-server, postgresql12-llvmjit
42+Requires: pg_hint_plan12 = 1.3.4
43+Summary: Just-in-time compilation support for pg_hint_plan12
4444
4545 %description llvmjit
46-Just-in-time compilation support for pg_hint_plan11
46+Just-in-time compilation support for pg_hint_plan12
4747
4848 ## pre work for build pg_hint_plan
4949 %prep
50-PATH=/usr/pgsql-11/bin:$PATH
50+PATH=/usr/pgsql-12/bin:$PATH
5151 if [ "${MAKE_ROOT}" != "" ]; then
5252 pushd ${MAKE_ROOT}
5353 make clean %{name}-%{version}.tar.gz
@@ -58,7 +58,7 @@ if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
5858
5959 ## Set variables for build environment
6060 %build
61-PATH=/usr/pgsql-11/bin:$PATH
61+PATH=/usr/pgsql-12/bin:$PATH
6262 make USE_PGXS=1 %{?_smp_mflags}
6363
6464 ## Set variables for install
--- a/expected/ut-J.out
+++ b/expected/ut-J.out
@@ -4708,8 +4708,8 @@ error hint:
47084708
47094709 \o
47104710 \! sql/maskout.sh results/ut-J.tmpout
4711- QUERY PLAN
4712---------------------------------------------------------------------------
4711+ QUERY PLAN
4712+-------------------------------------------------------------------------------
47134713 Hash Full Join (cost={inf}..{inf} rows=1000 width=xxx)
47144714 Hash Cond: (t1.c1 = t2.c1)
47154715 -> Seq Scan on t1 (cost=xxx..xxx rows=1000 width=xxx)
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -3761,8 +3761,9 @@ error hint:
37613761 c4 | text | | |
37623762 Indexes:
37633763 "ti1_pkey" PRIMARY KEY, btree (c1)
3764- "ti1_btree" btree (c1)
37653764 "ti1_c2_key" UNIQUE CONSTRAINT, btree (c2)
3765+ "ti1_uniq" UNIQUE, btree (c1)
3766+ "ti1_btree" btree (c1)
37663767 "ti1_expr" btree ((c1 < 100))
37673768 "ti1_gin" gin (c1)
37683769 "ti1_gist" gist (c1)
@@ -3774,7 +3775,6 @@ Indexes:
37743775 "ti1_multi" btree (c1, c2, c3, c4)
37753776 "ti1_pred" btree (lower(c4))
37763777 "ti1_ts" gin (to_tsvector('english'::regconfig, c4))
3777- "ti1_uniq" UNIQUE, btree (c1)
37783778
37793779 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 < 100 AND c2 = 1 AND lower(c4) = '1' AND to_tsvector('english', c4) @@ 'a & b' AND ctid = '(1,1)';
37803780 QUERY PLAN
@@ -4487,8 +4487,8 @@ error hint:
44874487
44884488 \o
44894489 \! sql/maskout.sh results/ut-S.tmpout
4490- QUERY PLAN
4491-------------------------------------------------------------------------
4490+ QUERY PLAN
4491+-------------------------------------------------------------------------------
44924492 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
44934493 Filter: (c1 = 100)
44944494
@@ -4505,8 +4505,8 @@ error hint:
45054505
45064506 \o
45074507 \! sql/maskout.sh results/ut-S.tmpout
4508- QUERY PLAN
4509-------------------------------------------------------------------------
4508+ QUERY PLAN
4509+-------------------------------------------------------------------------------
45104510 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
45114511 Filter: (c1 = 100)
45124512
@@ -4523,8 +4523,8 @@ error hint:
45234523
45244524 \o
45254525 \! sql/maskout.sh results/ut-S.tmpout
4526- QUERY PLAN
4527------------------------------------------------------------------------
4526+ QUERY PLAN
4527+-------------------------------------------------------------------------------
45284528 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
45294529 Filter: (c1 = 100)
45304530
@@ -4541,8 +4541,8 @@ error hint:
45414541
45424542 \o
45434543 \! sql/maskout.sh results/ut-S.tmpout
4544- QUERY PLAN
4545-------------------------------------------------------------------------
4544+ QUERY PLAN
4545+-------------------------------------------------------------------------------
45464546 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
45474547 Filter: (c1 = 100)
45484548
@@ -4559,8 +4559,8 @@ error hint:
45594559
45604560 \o
45614561 \! sql/maskout.sh results/ut-S.tmpout
4562- QUERY PLAN
4563-------------------------------------------------------------------------
4562+ QUERY PLAN
4563+-------------------------------------------------------------------------------
45644564 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
45654565 Filter: (c1 = 100)
45664566
@@ -4577,8 +4577,8 @@ error hint:
45774577
45784578 \o
45794579 \! sql/maskout.sh results/ut-S.tmpout
4580- QUERY PLAN
4581------------------------------------------------------------------------
4580+ QUERY PLAN
4581+-------------------------------------------------------------------------------
45824582 Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
45834583 Filter: (c1 = 100)
45844584
@@ -4601,8 +4601,8 @@ error hint:
46014601
46024602 \o
46034603 \! sql/maskout.sh results/ut-S.tmpout
4604- QUERY PLAN
4605------------------------------------------------------------------------
4604+ QUERY PLAN
4605+-------------------------------------------------------------------------------
46064606 Seq Scan on t1 (cost={inf}..{inf} rows=1 width=xxx)
46074607 Filter: (c1 = 1)
46084608
@@ -5277,8 +5277,8 @@ error hint:
52775277
52785278 \o
52795279 \! sql/maskout.sh results/ut-S.tmpout
5280- QUERY PLAN
5281-------------------------------------------------------------------------------
5280+ QUERY PLAN
5281+-------------------------------------------------------------------------------
52825282 Append (cost=xxx..xxx rows=4 width=xxx)
52835283 -> Index Scan using p1_i2 on p1 (cost=xxx..xxx rows=1 width=xxx)
52845284 Index Cond: (c2 = 1)
--- a/expected/ut-W.out
+++ b/expected/ut-W.out
@@ -1241,7 +1241,7 @@ error hint:
12411241
12421242 \o
12431243 \! sql/maskout2.sh results/ut-W.tmpout
1244- QUERY PLAN
1244+ QUERY PLAN
12451245 --(snip..)
12461246 Append
12471247 -> Result
Show on old repository browser