Skip to content

Commit

Permalink
Merge pull request #81 from ossc-db/pg12build-AMIT
Browse files Browse the repository at this point in the history
3.1.16 release
  • Loading branch information
MoonInsung authored Jan 17, 2020
2 parents f2f3ed9 + 712c03a commit 674698c
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 11 deletions.
6 changes: 5 additions & 1 deletion SPECS/pg_bulkload-pg10.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Update to pg_bulkload 3.1.15
Expand Down
8 changes: 6 additions & 2 deletions SPECS/pg_bulkload-pg11.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Summary: High speed data load utility for PostgreSQL
Name: %{sname}
Version: 3.1.15
Version: 3.1.16
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.15
Requires: pg_bulkload = 3.1.16
Summary: Just-in-time compilation support for pg_bulkload

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Added llvm.rpm for pg_bulkload to support llvmjit of PostgreSQL
Expand Down
105 changes: 105 additions & 0 deletions SPECS/pg_bulkload-pg12.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# SPEC file for pg_bulkload on PostgreSQL 11
# Copyright (C) 2009-2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

%define sname pg_bulkload
%define pgmajorversion 12

%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.16
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: postgresql12-devel, postgresql12
Requires: postgresql12


%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: postgresql12-server, postgresql12-llvmjit
Requires: pg_bulkload = 3.1.16
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
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
6 changes: 5 additions & 1 deletion SPECS/pg_bulkload-pg93.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Update to pg_bulkload 3.1.15
Expand Down
6 changes: 5 additions & 1 deletion SPECS/pg_bulkload-pg94.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Update to pg_bulkload 3.1.15
Expand Down
6 changes: 5 additions & 1 deletion SPECS/pg_bulkload-pg95.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Update to pg_bulkload 3.1.15
Expand Down
6 changes: 5 additions & 1 deletion SPECS/pg_bulkload-pg96.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

%changelog
* Wed Jan 22 2020 - Moon Insung <insung.moon.gk@hco.ntt.co.jp> 3.1.16-1
- Update to pg_bulkload 3.1.16
- Warn users of some risks of using parallel/multi-process mode
- Document restriction that pg_bulkload supports only tables of "heap" access method
* Mon Jan 21 2019 - Moon Insung <moon_insung_i3@lab.ntt.co.jp> 3.1.15-1
- Fixed pg_bulkload to mitigate attacks described in CVE-2018-1058
- Update to pg_bulkload 3.1.15
Expand Down
22 changes: 20 additions & 2 deletions docs/pg_bulkload-ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ <h3>フォーマット共通の設定項目</h3>
NO の場合は並行処理を行わず、シングルスレッドで実行します。デフォルトは NO です。
「WRITER=PARALLEL」と指定した場合は、MULTI_PROCESS は無視されます。
なお、ロード先のデータベースに対してパスワード認証を必要とする場合には .pgpass を設定しなければなりません。
詳細は<a href="#restrictions">使用上の注意と制約</a>を参照して下さい。
詳細は<a href="#restrictions">使用上の注意と制約</a>を参照して下さい。pg_bulkloadのMULTI_PROCESSやparallelを有効にして実行場合、他のPostgreSQLバックエンドプロセスがテーブルスキーマを変更しないようにください。
データの読み取りするプロセスとデータを書き出しプロセスで見られるテーブルスキーマが異なり、問題が発生する可能性があります。
</dd>

</dl>
Expand Down Expand Up @@ -588,6 +589,13 @@ <h2 id="environment">環境変数</h2>

<h2 id="restrictions">使用上の注意と制約</h2>

<h3>PostgreSQL 12のプラガブルなテーブルアクセスメソッドをサポート。</h3>
<p>
pg_bulkload「ヒープ」構造のテーブルへのデータロードのみサポートしています。
PostgreSQL 12では新しいプラガブルなテーブルアクセスメソッドAPIを通過するように修正されていることになりますが、
pg_bulkloadは「ヒープ」構造以外はサポートしません。
</p>

<h3>pg_bulkload の終了コード</h3>
<p>
データロードが正常に終了した場合は 0 が返ります。
Expand Down Expand Up @@ -774,12 +782,22 @@ <h3 id="rpm">RPM パッケージからのインストール</h3>
<h2 id="requirement">動作環境</h2>
<dl>
<dt>PostgreSQLバージョン</dt>
<dd>PostgreSQL 9.3, 9.4, 9.5, 9.6, 10, 11</dd>
<dd>PostgreSQL 9.3, 9.4, 9.5, 9.6, 10, 11, 12</dd>
<dt>OS</dt>
<dd>RHEL 6/7</dd>
</dl>

<h2 id="releasenote">リリースノート</h2>

<p>
<h4>3.1.16</h4>
<ul>
<li>PostgreSQL 12に対応</li>
<li>pg_bulkloadのPARALLELやMULTI_PROCESS機能を有効化して使用する場合、いくつかの注意点をドキュメントに追加しました</li>
<li>pg_bulkloadは「ヒープ」構造のテーブルのみサポートになることをドキュメントに追加しました</li>
</ul>
</p>

<p>
<h4>3.1.15</h4>
<ul>
Expand Down
11 changes: 10 additions & 1 deletion docs/pg_bulkload.html
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,22 @@ <h3 id="rpm">Installation from RPM package</h3>
<h2 id="requirement">Requirements</h2>
<dl>
<dt>PostgreSQL versions</dt>
<dd>PostgreSQL 9.3, 9.4, 9.5, 9.6, 10, 11</dd>
<dd>PostgreSQL 9.3, 9.4, 9.5, 9.6, 10, 11, 12</dd>
<dt>OS</dt>
<dd>RHEL 6/7</dd>
</dl>

<h2 id="releasenote">Release Notes</h2>

<p>
<h4>3.1.16</h4>
<ul>
<li>Added support for PostgreSQL 16</li>
<li>Fixed documentation to warn users of some risks of using parallel/multi-process mode</li>
<li>Document restriction that pg_bulkload supports only tables of "heap" access method</li>
</ul>
</p>

<p>
<h4>3.1.15</h4>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef COMMON_H_INCLUDED
#define COMMON_H_INCLUDED

#define PG_BULKLOAD_VERSION "3.1.15"
#define PG_BULKLOAD_VERSION "3.1.16"


#ifndef PG_BULKLOAD_PRINTF_ATTRIBUTE
Expand Down

0 comments on commit 674698c

Please sign in to comment.