PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
-STARBALL11 = pg_hint_plan11-$(HINTPLANVER).tar.gz
-STARBALLS = $(STARBALL11)
+STARBALL12 = pg_hint_plan12-$(HINTPLANVER).tar.gz
+STARBALLS = $(STARBALL12)
TARSOURCES = Makefile *.c *.h COPYRIGHT* \
pg_hint_plan--*.sql \
installcheck: $(REGRESSION_EXPECTED)
-rpms: rpm11
+rpms: rpm12
# pg_hint_plan.c includes core.c and make_join_rel.c
pg_hint_plan.o: core.c make_join_rel.c # pg_stat_statements.c
tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^)
rm $(subst .tar.gz,,$@)
-rpm11: $(STARBALL11)
- MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan11.spec
+rpm12: $(STARBALL12)
+ MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan12.spec
# SPEC file for pg_store_plans
# Copyright(C) 2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
-%define _pgdir /usr/pgsql-11
+%define _pgdir /usr/pgsql-12
%define _bindir %{_pgdir}/bin
%define _libdir %{_pgdir}/lib
%define _datadir %{_pgdir}/share
%endif
## Set general information for pg_store_plans.
-Summary: Optimizer hint on PostgreSQL 11
-Name: pg_hint_plan11
+Summary: Optimizer hint on PostgreSQL 12
+Name: pg_hint_plan12
Version: 1.3.4
Release: 1%{?dist}
License: BSD
Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
## We use postgresql-devel package
-BuildRequires: postgresql11-devel
-Requires: postgresql11-server
+BuildRequires: postgresql12-devel
+Requires: postgresql12-server
## Description for "pg_hint_plan"
%description
pg_hint_plan provides capability to tweak execution plans to be
executed on PostgreSQL.
-Note that this package is available for only PostgreSQL 11.
+Note that this package is available for only PostgreSQL 12.
%package llvmjit
-Requires: postgresql11-server, postgresql11-llvmjit
-Requires: pg_hint_plan11 = 1.3.4
-Summary: Just-in-time compilation support for pg_hint_plan11
+Requires: postgresql12-server, postgresql12-llvmjit
+Requires: pg_hint_plan12 = 1.3.4
+Summary: Just-in-time compilation support for pg_hint_plan12
%description llvmjit
-Just-in-time compilation support for pg_hint_plan11
+Just-in-time compilation support for pg_hint_plan12
## pre work for build pg_hint_plan
%prep
-PATH=/usr/pgsql-11/bin:$PATH
+PATH=/usr/pgsql-12/bin:$PATH
if [ "${MAKE_ROOT}" != "" ]; then
pushd ${MAKE_ROOT}
make clean %{name}-%{version}.tar.gz
## Set variables for build environment
%build
-PATH=/usr/pgsql-11/bin:$PATH
+PATH=/usr/pgsql-12/bin:$PATH
make USE_PGXS=1 %{?_smp_mflags}
## Set variables for install
\o
\! sql/maskout.sh results/ut-J.tmpout
- QUERY PLAN
---------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Hash Full Join (cost={inf}..{inf} rows=1000 width=xxx)
Hash Cond: (t1.c1 = t2.c1)
-> Seq Scan on t1 (cost=xxx..xxx rows=1000 width=xxx)
c4 | text | | |
Indexes:
"ti1_pkey" PRIMARY KEY, btree (c1)
- "ti1_btree" btree (c1)
"ti1_c2_key" UNIQUE CONSTRAINT, btree (c2)
+ "ti1_uniq" UNIQUE, btree (c1)
+ "ti1_btree" btree (c1)
"ti1_expr" btree ((c1 < 100))
"ti1_gin" gin (c1)
"ti1_gist" gist (c1)
"ti1_multi" btree (c1, c2, c3, c4)
"ti1_pred" btree (lower(c4))
"ti1_ts" gin (to_tsvector('english'::regconfig, c4))
- "ti1_uniq" UNIQUE, btree (c1)
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)';
QUERY PLAN
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Seq Scan on t1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 1)
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------------------
Append (cost=xxx..xxx rows=4 width=xxx)
-> Index Scan using p1_i2 on p1 (cost=xxx..xxx rows=1 width=xxx)
Index Cond: (c2 = 1)
\o
\! sql/maskout2.sh results/ut-W.tmpout
- QUERY PLAN
+ QUERY PLAN
--(snip..)
Append
-> Result