More Related Content
Similar to PostgreSQLのgitレポジトリから見える2022年の開発状況(第38回PostgreSQLアンカンファレンス@オンライン 発表資料) (20)
More from NTT DATA Technology & Innovation (20)
PostgreSQLのgitレポジトリから見える2022年の開発状況(第38回PostgreSQLアンカンファレンス@オンライン 発表資料)
- 1. © 2023 NTT DATA Corporation 1
第38回 PostgreSQLアンカンファレンス@オンライン
PostgreSQLのgitレポジトリから見える2022年の開発状況
2023年1月27日
株式会社NTTデータ 藤井 雅雄
- 2. © 2023 NTT DATA Corporation 2
自己紹介
藤井 雅雄
Database Technical Lead @ NTTデータ
データベース研究開発
PostgreSQL 技術支援
PostgreSQLコミッタ
レプリケーション
WAL圧縮
バックアップ進捗確認
pg_bigm(全文検索モジュール) コミッタ
fujii_masao
MasaoFujii
- 3. © 2023 NTT DATA Corporation 3
本講演について
講演資料は、後日、NTTデータのSlideShareアカウント上で公開予定です。
https://www.slideshare.net/nttdata-tech
今日紹介するPostgreSQL16に関する内容は、
正式リリースまでの間に変更となる可能性があることにご注意ください!!
- 4. © 2023 NTT DATA Corporation 4
PostgreSQLのgitレポジトリから見える2022年の
開発状況
- 5. © 2023 NTT DATA Corporation 5
昨年は2021年の開発状況を発表
PostgreSQLのgitレポジトリから見える2021年の開発状況
(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
https://www.slideshare.net/nttdata-tech/postgresql-development-community-
activities-2021-pgunconf30-nttdata
- 6. © 2023 NTT DATA Corporation 6
前提
$ git branch
REL_11_STABLE
REL_12_STABLE
REL_13_STABLE
REL_14_STABLE
REL_15_STABLE
master
調査対象のブランチはmasterのみ
$ git clone git://git.postgresql.org/git/postgresql.git
$ git clone https://github.com/postgres/postgres.git
PostgreSQL本体のgitレポジトリを調査
$ git ... --since 2022-01-01 --until 2022-12-31
--sinceと--untilのオプション指定で2022年のコミットを取得
- 7. © 2023 NTT DATA Corporation 7
2022年の総コミット数
$ git log --since 2022-01-01 --until 2022-12-31 --oneline | wc -l
2487
2022年の総コミット数
$ git log --until 2022-12-31 --pretty=format:"%cd"
--date=format:"%Y" | sort | uniq -c | awk '{print $2 " " $1}' | tail -5
2018 2127
2019 2130
2020 2181
2021 2271
2022 2487
直近5年の各年の総コミット数
2022年は例年よりも多いコミット数
- 8. © 2023 NTT DATA Corporation 8
1996年から2022年までの各年のコミット数の推移
$ git log --until 2022-12-31 --pretty=format:"%cd" --date=format:"%Y" |
sort | uniq -c | awk '{print $2 " " $1}'
0
500
1000
1500
2000
2500
3000
3500
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
v10 (論理レプリ、パーティション)
大きな機能が入った
v10並みのコミット数
- 9. © 2023 NTT DATA Corporation 9
2022年の月別のコミット数の推移
$ git log --since 2022-01-01 --until 2022-12-31 --pretty=format:"%cd"
--date=format:"%Y-%m" | sort | uniq -c
0
50
100
150
200
250
300
350
1 2 3 4 5 6 7 8 9 10 11 12
2021
2022
Feature Freezeの時期も含めて
上半期は昨年よりコミット数が少ない 7月からコミット数が増加
(増加理由の考察は後述)
- 10. © 2023 NTT DATA Corporation 10
2022年のコミッタ別のコミット数
$ git shortlog --since 2022-01-01 --until 2022-12-31 -s -n | nl
1 481 Tom Lane
2 323 Michael Paquier
3 317 Peter Eisentraut
4 245 Andres Freund
5 140 Thomas Munro
6 138 Alvaro Herrera
7 123 Robert Haas
8 91 David Rowley
9 83 Andrew Dunstan
10 79 Amit Kapila
11 74 Bruce Momjian
12 67 John Naylor
13 64 Daniel Gustafsson
14 64 Peter Geoghegan
15 33 Jeff Davis
16 29 Etsuro Fujita
17 28 Tomas Vondra
18 23 Noah Misch
19 22 Fujii Masao (2021年は108件)
20 17 Alexander Korotkov
21 16 Heikki Linnakangas
22 11 Dean Rasheed
23 8 Tatsuo Ishii
24 6 Magnus Hagander
25 3 Joe Conway
26 2 Stephen Frost
- 11. © 2023 NTT DATA Corporation 11
2022年の(コミッタ所属の)会社別のコミット数
1 830 EnterpriseDB (7)
2 485 Crunchy Data (2)
3 476 Microsoft (3)
4 423 Amazon Web Services (4)
5 79 Fujitsu (1)
6 64 VMware (1)
7 29 NTT (1)
8 23 Individuals (2)
9 22 NTT DATA (1)
10 17 Oriole DB (1)
11 16 Neon, Inc (1)
12 11 University of Cambridge (1)
13 8 SRA OSS (1)
14 6 Redpill Linpro (1)
※2022年のコミッタ別のコミット数について、
2022年末時点のコミッタの所属企業ごとに集計
※()内の数字は各企業の所属コミッタ数
- 12. © 2023 NTT DATA Corporation 12
2022年7~9月によく更新されたソースファイル
-- 今回は抽出にfile_fdwを使うため、その準備をする。
=# CREATE EXTENSION file_fdw;
=# CREATE SERVER gitlog FOREIGN DATA WRAPPER file_fdw;
-- 2021年7~9月におけるソースファイルごとのコミット数をfile_fdw経由で取得する外部テーブルを作成する。
=# CREATE FOREIGN TABLE t21 (file text, count int) SERVER gitlog OPTIONS (
program 'cd <PostgreSQLのgitレポジトリのパス>;
git log --since 2021-07-01 --until 2021-09-30 --numstat |
grep -E ^[0-9] | cut -f3 | sort | uniq -c | sort -n | awk ''{print $2 "," $1}''',
format 'csv');
-- 2022年7~9月におけるソースファイルごとのコミット数をfile_fdw経由で取得する外部テーブルを作成する。
=# CREATE FOREIGN TABLE t22 (file text, count int) SERVER gitlog OPTIONS (
program 'cd <PostgreSQLのgitレポジトリのパス>;
git log --since 2022-07-01 --until 2022-09-30 --numstat |
grep -E ^[0-9] | cut -f3 | sort | uniq -c | sort -n | awk ''{print $2 "," $1}''',
format 'csv');
2022年7~9月のコミット数が2021年7~9月より20以上多いソースファイルを抽出
- 13. © 2023 NTT DATA Corporation 13
2022年7~9月によく更新されたソースファイル
-- 外部テーブルの結合結果から、2022年7~9月のコミット数が
-- 2021年7~9月より20以上多いソースファイルを抽出する。
=# SELECT diff, file
FROM (SELECT file, COALESCE(t22.count, 0) - COALESCE(t21.count, 0) diff
FROM t21 FULL OUTER JOIN t22 USING (file))
WHERE diff >= 20 ORDER BY diff DESC;
diff | file
------+-------------------------------------------
49 | configure
46 | src/tools/msvc/Solution.pm
42 | configure.ac
37 | src/include/pg_config.h.in
20 | src/include/port.h
(5 rows)
2022年7~9月のコミット数が2021年7~9月より20以上多いソースファイルを抽出
特にビルド関連のファイルに対するコミット数が多い
- 14. © 2023 NTT DATA Corporation 14
2022年7月のビルド関連ファイルへのコミット
$ git log --since 2022-07-01 --until 2022-07-31 --pretty=format:%s
configure src/tools/msvc/Solution.pm configure.ac src/include/pg_config.h.in src/include/port.h
Remove dead getpwuid_r replacement code.
Remove dead handling for pre-POSIX sigwait().
Remove dead getrusage replacement code.
Remove configure probe for wctype.h.
Remove configure probe for sys/tas.h.
Remove fls(), use pg_leftmost_one_pos32() instead.
Add wal_sync_method=fdatasync for Windows.
Add output directory option to gen_node_support.pl
Add output file argument to generate-errcodes.pl
Add output path arg in generate-lwlocknames.pl
ecpg: Output dir, source dir, stamp file argument for preproc/*.pl
psql: Output dir and dependency generation for sql_help
Fix configure executable permissions.
Default to hidden visibility for extension libraries where possible
Remove support for Visual Studio 2013
Invent qsort_interruptible().
Rationalize order of input files for gen_node_support.pl.
Automatically generate node support functions
Remove HP-UX port.
Unify DLSUFFIX on Darwin
ビルド関連ファイルへのコミットは、主に、
古いプラットフォームのサポートの終了と
不要なコードの削除
以下の理由によりv16からHP-UXのサポートを打ち切り
• HP-UXのHWはもう生産されていない
• BuildFarmでも最近HP-UXに対応しなくなった
• HP-UXのサポート対応を頑張る活発なメンテナがいない
• v16でビルドシステムの大幅な書き換えを予定していて、
それには各OSごとの対応が必要になるため、今がHP-
UXのサポートを打ち切るよいタイミング
HP/Intel Itaniumのサポートもv16から打ち切り
- 15. © 2023 NTT DATA Corporation 15
2022年8月のビルド関連ファイルへのコミット
Remove configure probe for sockaddr_in6 and require AF_INET6.
Remove further unwanted linker flags from perl_embed_ldflags
Remove configure probes for sockaddr_storage members.
Don't add HAVE_LDAP_H HAVE_WINLDAP_H to pg_config.h
Remove unused configure variable.
Remove configure probe for netinet/tcp.h.
Remove configure probe for sys/sockio.h.
Remove configure probe for net/if.h.
Remove configure probe for gethostbyname_r.
Remove replacement code for getaddrinfo.
Remove configure probe for struct sockaddr_storage.
Remove HAVE_UNIX_SOCKETS.
Remove configurability of PPC spinlock assembly code.
Remove configure probe for shl_load library.
Remove configure probe for sys/resource.h and refactor.
Remove configure probes for sys/ipc.h, sys/sem.h, sys/shm.h.
Remove configure probe for sys/select.h.
Remove configure probes for sys/un.h and struct sockaddr_un.
Remove configure probe for sys/uio.h.
Fix MSVC build script's check for obsolete node support functions.
Trust a few system headers to stand on their own
windows: Remove HAVE_MINIDUMP_TYPE test
Rely on __func__ being supported
Simplify replacement code for strtof.
Simplify gettimeofday() fallback logic.
Replace pgwin32_is_junction() with lstat().
Remove fallbacks for strtoll, strtoull.
Remove configure probe for fdatasync.
Remove configure probe for clock_gettime.
Simplify replacement code for preadv and pwritev.
Remove dead pread and pwrite replacement code.
Remove dead setenv, unsetenv replacement code.
Remove configure probes for poll and poll.h.
Remove configure probe for link.
Remove configure probes for symlink/readlink, and dead code.
Remove configure probe for setsid.
Remove configure probe for shm_open.
Remove configure probe and related tests for getrlimit.
Remove configure probe for dlopen, and refactor.
$ git log --since 2022-08-01 --until 2022-08-31 --pretty=format:%s
configure src/tools/msvc/Solution.pm configure.ac src/include/pg_config.h.in src/include/port.h
古いプラットフォームで必要とされていた
今では不要なコードの削除・掃除
- 16. © 2023 NTT DATA Corporation 16
2022年9月のビルド関連ファイルへのコミット
$ git log --since 2022-09-01 --until 2022-09-30 --pretty=format:%s
configure src/tools/msvc/Solution.pm configure.ac src/include/pg_config.h.in src/include/port.h
Restore pg_pread and friends.
meson: Add initial version of meson based build system
Add definition pg_attribute_aligned() for MSVC
Harmonize more parameter names in bulk.
Remove DLLTOOL, DLLWRAP from configure / Makefile.global.in
aix: xlc: Use -Wl,-b,expfull for old compiler versions
Clean up minor inconsistencies in pg_attribute_printf() usage.
Use SIGNAL_ARGS consistently to declare signal handlers.
Bump minimum Perl version to 5.14
configure: Expand -fvisibility checks to more compilers, test for -qvisibility
Bump minimum version of Flex to 2.5.35
Bump minimum version of Bison to 2.3
Mesonベースのビルドシステムをv16からサポート。
以降、ソースツリー内で成熟させていく方針
https://wiki.postgresql.org/wiki/Meson
https://www.postgresql.org/docs/devel/install-meson.html
既存ビルドシステムの課題への対応
• Autoconfは古くなりつつあり、それを扱える開発者が少なくなってきている
• 再帰的なmakeは依存性の問題を解決するのが難しく、インクリメンタルなビルドには時間がかかる
• MSVCビルドシステムは、Windowsを使っていない開発者にとってはメンテナンスが難しく、テストはシリ
アルに実行される
- 17. © 2023 NTT DATA Corporation 17
その他、記載されている会社名、商品名、又はサービス名は、
各社の登録商標又は商標です。