Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To support PostgreSQL v15 #131

Merged
merged 18 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
strategy:
matrix:
PGVERSION: # TODO: build with master branch
- "15"
- "14"
- "13"
- "12"
- "11"
- "10"
- "9.6"
- "9.5"
env:
CACHE_VERSION: 20210426 # to identify cache version
CACHE_VERSION: 20221222 # to identify cache version

steps:
- name: cat version
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
strategy:
matrix:
PGVERSION: # TODO: build with master branch
- "14.0"
- "13.4"
- "12.8"
- "11.13"
- "10.18"
- "9.6.23"
- "9.5.25"
- "15.1"
- "14.6"
- "13.9"
- "12.13"
- "11.18"
- "10.23"
- "9.6.24"
env:
CACHE_VERSION: 20210426 # to identify cache version
CACHE_VERSION: 20221222 # to identify cache version

steps:
- name: cat version
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2008-2021, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
Copyright (c) 2008-2023, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# pg_bulkload: Makefile
#
# Copyright (c) 2007-2021, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (c) 2007-2023, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
#
ifndef USE_PGXS
top_builddir = ../..
Expand Down
7 changes: 5 additions & 2 deletions SPECS/pg_bulkload-pg10.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 10
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 10
Expand All @@ -9,7 +9,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand Down Expand Up @@ -82,6 +82,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
Expand Down
9 changes: 6 additions & 3 deletions SPECS/pg_bulkload-pg11.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 11
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 11
Expand All @@ -10,7 +10,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand All @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql11-server, postgresql11-llvmjit
Requires: pg_bulkload = 3.1.19
Requires: pg_bulkload = 3.1.20
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -99,6 +99,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
Expand Down
9 changes: 6 additions & 3 deletions SPECS/pg_bulkload-pg12.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 12
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 12
Expand All @@ -10,7 +10,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand All @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql12-server, postgresql12-llvmjit
Requires: pg_bulkload = 3.1.19
Requires: pg_bulkload = 3.1.20
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -99,6 +99,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
Expand Down
9 changes: 6 additions & 3 deletions SPECS/pg_bulkload-pg13.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 13
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 13
Expand All @@ -10,7 +10,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand All @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql13-server, postgresql13-llvmjit
Requires: pg_bulkload = 3.1.19
Requires: pg_bulkload = 3.1.20
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -99,6 +99,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
Expand Down
9 changes: 6 additions & 3 deletions SPECS/pg_bulkload-pg14.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 14
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 14
Expand All @@ -10,7 +10,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand All @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql14-server, postgresql14-llvmjit
Requires: pg_bulkload = 3.1.19
Requires: pg_bulkload = 3.1.20
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -99,6 +99,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
104 changes: 104 additions & 0 deletions SPECS/pg_bulkload-pg15.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# SPEC file for pg_bulkload on PostgreSQL 15
# Copyright (C) 2022-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 15

%define _prefix /usr/pgsql-%{pgmajorversion}
%define _libdir %{_prefix}/lib
%define _bcdir %{_libdir}/bitcode/pg_bulkload

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
# You can get the tarball by following: https://github.com/ossc-db/pg_bulkload/archive/%{version}.tar.gz
Source0: %{sname}-%{version}.tar.gz
URL: http://ossc-db.github.io/pg_bulkload/index.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)

BuildRequires: postgresql15-devel, postgresql15
Requires: postgresql15


%description
pg_bulkload provides high-speed data loading capability to PostgreSQL users.

When we load huge amount of data to a database, it is common situation that data set to be loaded is valid and consistent. For example, dedicated tools are used to prepare such data, providing data validation in advance. In such cases, we'd like to bypass any overheads within database system to load data as quickly as possible. pg_bulkload is developed to help such situations. Therefore, it is not pg_bulkload's goal to provide detailed data validation. Rather, pg_bulkload asumes that loaded data set is validated by separate means. If you're not in such situation, you should use COPY command in PostgreSQL.


%package llvmjit
Requires: postgresql15-server, postgresql15-llvmjit
Requires: pg_bulkload = 3.1.20
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Just-in-time compilation support for pg_bulkdload

%prep
rm -rf %{_libdir}/pgxs/src/backend/

%setup -n %{sname}-%{version}

%build
USE_PGXS=1 make %{?_smp_mflags} MAJORVERSION=%{pgmajorversion}

%install
%define pg_contribdir %{_datadir}/contrib
%define pg_extensiondir %{_datadir}/extension

rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{pg_contribdir}
install -d %{buildroot}%{pg_extensiondir}
install -d %{buildroot}%{_bcdir}

install -m 755 bin/pg_bulkload %{buildroot}%{_bindir}/pg_bulkload
install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
install -m 644 docs/sample_bin.ctl %{buildroot}%{pg_contribdir}/sample_bin.ctl
install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sample_csv.ctl

%files
%defattr(755,root,root,755)
%{_bindir}/pg_bulkload
%{_bindir}/postgresql
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql

%files llvmjit
%defattr(0755,root,root)
%{_bcdir}
%defattr(0644,root,root)
%{_bcdir}/pg_bulkload.bc

%clean
rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
7 changes: 5 additions & 2 deletions SPECS/pg_bulkload-pg96.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPEC file for pg_bulkload on PostgreSQL 9.6
# Copyright (C) 2009-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2009-2023 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 9.6
Expand All @@ -9,7 +9,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.19
Version: 3.1.20
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Expand Down Expand Up @@ -82,6 +82,9 @@ rm -rf %{buildroot}
rm -rf %{_libdir}/pgxs/src/backend/

%changelog
* Thu Jan 13 2023 - NTT OSS Center <[email protected]> 3.1.20-1
- Support PostgreSQL 15
- Update to pg_bulkload 3.1.20
* Mon Oct 11 2021 - Masahiro ikeda <[email protected]> 3.1.19-1
- Support PostgreSQL 14
- Update to pg_bulkload 3.1.19
Expand Down
Loading