Skip to content

Commit 26906de

Browse files
committed
Support PostgreSQL 16, bump version of pg_store_plans to 1.8
This program requires some parser constants, but PostgreSQL 16 hides gram.h in non-public directory. Since I haven't found the proper way to do this automatically, this version has to include some parser constants manually. Future versions will aim to address this issue by finding a way to include parser constants automatically.
1 parent ea3a308 commit 26906de

File tree

10 files changed

+1353
-1165
lines changed

10 files changed

+1353
-1165
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pg_stat_plan/Makefile
22

33
MODULES = pg_store_plans
4-
STOREPLANSVER = 1.7
4+
STOREPLANSVER = 1.8
55

66
MODULE_big = pg_store_plans
77
OBJS = pg_store_plans.o pgsp_json.o pgsp_json_text.o pgsp_explain.o
@@ -10,7 +10,7 @@ EXTENSION = pg_store_plans
1010

1111
PG_VERSION := $(shell pg_config --version | sed "s/^PostgreSQL //" | sed "s/\.[0-9]*$$//")
1212

13-
DATA = pg_store_plans--1.7.sql
13+
DATA = pg_store_plans--1.8.sql
1414

1515
REGRESS = convert store
1616
REGRESS_OPTS = --temp-config=regress.conf
@@ -25,8 +25,8 @@ include $(top_builddir)/src/Makefile.global
2525
include $(top_srcdir)/contrib/contrib-global.mk
2626
endif
2727

28-
STARBALL15 = pg_store_plans15-$(STOREPLANSVER).tar.gz
29-
STARBALLS = $(STARBALL15)
28+
STARBALL16 = pg_store_plans16-$(STOREPLANSVER).tar.gz
29+
STARBALLS = $(STARBALL16)
3030

3131
TARSOURCES = Makefile *.c *.h \
3232
pg_store_plans--*.sql \
@@ -40,7 +40,7 @@ endif
4040
## These entries need running server
4141
DBNAME = postgres
4242

43-
rpms: rpm15
43+
rpms: rpm16
4444

4545
$(STARBALLS): $(TARSOURCES)
4646
if [ -h $(subst .tar.gz,,$@) ]; then rm $(subst .tar.gz,,$@); fi
@@ -52,8 +52,8 @@ $(STARBALLS): $(TARSOURCES)
5252
tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^)
5353
rm $(subst .tar.gz,,$@)
5454

55-
rpm15: $(STARBALL15)
56-
MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_store_plans15.spec
55+
rpm16: $(STARBALL16)
56+
MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_store_plans16.spec
5757

5858
testfiles: convert.out convert.sql
5959

SPECS/pg_store_plans15.spec renamed to SPECS/pg_store_plans16.spec

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPEC file for pg_store_plans
22
# Copyright(c) 2022, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
33

4-
%define _pgdir /usr/pgsql-15
4+
%define _pgdir /usr/pgsql-16
55
%define _bindir %{_pgdir}/bin
66
%define _libdir %{_pgdir}/lib
77
%define _datadir %{_pgdir}/share
@@ -14,9 +14,9 @@
1414
%endif
1515

1616
## Set general information for pg_store_plans.
17-
Summary: Record executed plans on PostgreSQL 15
18-
Name: pg_store_plans15
19-
Version: 1.7
17+
Summary: Record executed plans on PostgreSQL 16
18+
Name: pg_store_plans16
19+
Version: 1.8
2020
Release: 1%{?dist}
2121
License: BSD
2222
Group: Applications/Databases
@@ -26,28 +26,28 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
2626
Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
2727

2828
## We use postgresql-devel package
29-
BuildRequires: postgresql15-devel
30-
Requires: postgresql15-libs
29+
BuildRequires: postgresql16-devel
30+
Requires: postgresql16-libs
3131

3232
## Description for "pg_store_plans"
3333
%description
3434

3535
pg_store_plans provides capability to record statistics for every plan
3636
executed on PostgreSQL.
3737

38-
Note that this package is available for only PostgreSQL 15.
38+
Note that this package is available for only PostgreSQL 16.
3939

4040
%package llvmjit
41-
Requires: postgresql15-server, postgresql15-llvmjit
42-
Requires: pg_store_plans15 = 1.7
43-
Summary: Just-in-time compilation support for pg_store_plans15
41+
Requires: postgresql16-server, postgresql16-llvmjit
42+
Requires: pg_store_plans16 = 1.8
43+
Summary: Just-in-time compilation support for pg_store_plans16
4444

4545
%description llvmjit
46-
Just-in-time compilation support for pg_store_plans15
46+
Just-in-time compilation support for pg_store_plans16
4747

4848
## pre work for build pg_store_plans
4949
%prep
50-
PATH=/usr/pgsql-15/bin:$PATH
50+
PATH=/usr/pgsql-16/bin:$PATH
5151
if [ "${MAKE_ROOT}" != "" ]; then
5252
pushd ${MAKE_ROOT}
5353
make clean %{name}-%{version}.tar.gz
@@ -58,14 +58,14 @@ if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
5858

5959
## Set variables for build environment
6060
%build
61-
PATH=/usr/pgsql-15/bin:$PATH
61+
PATH=/usr/pgsql-16/bin:$PATH
6262
pg_config
6363
make USE_PGXS=1 %{?_smp_mflags}
6464

6565
## Set variables for install
6666
%install
6767
rm -rf %{buildroot}
68-
PATH=/usr/pgsql-15/bin:$PATH
68+
PATH=/usr/pgsql-16/bin:$PATH
6969
make install DESTDIR=%{buildroot}
7070

7171
%clean
@@ -75,7 +75,7 @@ rm -rf %{buildroot}
7575
%defattr(0755,root,root)
7676
%{_libdir}/pg_store_plans.so
7777
%defattr(0644,root,root)
78-
%{_datadir}/extension/pg_store_plans--1.7.sql
78+
%{_datadir}/extension/pg_store_plans--1.8.sql
7979
%{_datadir}/extension/pg_store_plans.control
8080

8181
%files llvmjit
@@ -85,6 +85,8 @@ rm -rf %{buildroot}
8585

8686
# History of pg_store_plans.
8787
%changelog
88+
* Fri Feb 02 2024 Kyotaro Horiguchi
89+
- Version 1.8. Support PostgreSQL 16.
8890
* Wed Dec 14 2022 Kyotaro Horiguchi
8991
- Version 1.7. Support PostgreSQL 15.
9092
* Thu Feb 03 2022 Kyotaro Horiguchi

0 commit comments

Comments
 (0)