More Related Content
Similar to PostgreSQLのgitレポジトリから見える2020年の開発状況(第20回PostgreSQLアンカンファレンス@オンライン 発表資料) (20)
More from NTT DATA Technology & Innovation (20)
PostgreSQLのgitレポジトリから見える2020年の開発状況(第20回PostgreSQLアンカンファレンス@オンライン 発表資料)
- 2. © 2021 NTT DATA Corporation 2
2
© 2021 NTT DATA Corporation
自己紹介
藤井 雅雄
Database Technical Lead @ NTTデータ
データベース研究開発
PostgreSQL 技術支援
PostgreSQLコミッタ
レプリケーション
WAL圧縮
バックアップ進捗確認
pg_bigm(全文検索モジュール)コミッタ
@fujii_masao
- 3. © 2021 NTT DATA Corporation 3
YouTubeチャンネル “NTT DATA Tech”
技術取り組み、活用情報を中心にお届けします
https://www.youtube.com/NTTDATATech
- 4. © 2021 NTT DATA Corporation 4
4
© 2021 NTT DATA Corporation
本講演について
講演資料は、NTTデータのSlideShareアカウント上で公開予定です。
https://www.slideshare.net/nttdata-tech
PostgreSQLカンファレンスや以前のアンカンファレンスの講演資料も公開しています。
• 押さえておきたい、PostgreSQL 13 の新機能!!
• オンライン物理バックアップの排他モードと非排他モードについて
• PostgreSQL 13 での pg_stat_statements の改善について
• PostgreSQL 13 での pg_basebackup の改善について
• PostgreSQL 13 での レプリケーション関連 の改善について
- 5. © 2021 NTT DATA Corporation
PostgreSQLのgitレポジトリから見える
2020年の開発状況
- 6. © 2021 NTT DATA Corporation 6
6
© 2021 NTT DATA Corporation
前提
$ git branch
REL9_5_STABLE
REL9_6_STABLE
REL_10_STABLE
REL_11_STABLE
REL_12_STABLE
REL_13_STABLE
master
調査対象のブランチはmasterのみ
$ git clone git://git.postgresql.org/git/postgresql.git
$ git clone https://github.com/postgres/postgres.git
PostgreSQL本体のgitレポジトリを調査
- 7. © 2021 NTT DATA Corporation 7
7
© 2021 NTT DATA Corporation
前提
$ git log --since 2020-01-01 --until 2020-12-31
--pretty=format:"%h %cd %s" --date=iso-local | tail -1
7559d8ebfa 2020-01-02 02:21:45 +0900 Update copyrights for 2020
$ git log --since 2020-01-01 --until 2020-12-31
--pretty=format:"%h %cd %s" --date=iso-local | head -1
32d6287d2e 2020-12-31 10:21:42 +0900
Get heap page max offset with buffer lock held.
もしくは、下記のコミットのハッシュを指定して2020年のコミットを取得
$ git ... --since 2020-01-01 --until 2020-12-31
--sinceと--untilのオプション指定で2020年のコミットを取得
- 8. © 2021 NTT DATA Corporation 8
8
© 2021 NTT DATA Corporation
2020年の総コミット数
$ git log --since 2020-01-01 --until 2020-12-31 --oneline | wc -l
2180
2020年の総コミット数
$ git log --pretty=format:"%cd" --date=format:"%Y" | sort |
uniq -c | awk '{print $2 " " $1}' | tail -5
2017 2477
2018 2127
2019 2130
2020 2181
2021 129
直近5年の各年の総コミット数
2020年は例年並みのコミット数?
総コミット数については新型コロナの影響はなさそう
- 9. © 2021 NTT DATA Corporation 9
9
© 2021 NTT DATA Corporation
1996年から2020年までの各年のコミット数の推移
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
$ git log --pretty=format:"%cd" --date=format:"%Y" | sort | uniq -c |
awk '{print $2 " " $1}'
v10 (論理レプリ、パーティション)
v7.1 (WAL、TOAST)
- 10. © 2021 NTT DATA Corporation 10
10
© 2021 NTT DATA Corporation
2020年の月別のコミット数の推移
$ git log --since 2020-01-01 --until 2020-12-31 --pretty=format:"%cd"
--date=format:"%Y-%m" | sort | uniq -c
0
50
100
150
200
250
300
1 2 3 4 5 6 7 8 9 10 11 12
Feature Freeze
夏休み??
クリスマス休暇??
- 11. © 2021 NTT DATA Corporation 11
11
© 2021 NTT DATA Corporation
2020年のコミッタ別のコミット数
$ git shortlog --since 2020-01-01 --until 2020-12-31 -s -n | nl
1 567 Tom Lane
2 261 Peter Eisentraut
3 244 Michael Paquier
4 131 Bruce Momjian
5 122 Alvaro Herrera
6 115 Peter Geoghegan
7 108 Fujii Masao
8 93 Amit Kapila
9 69 Thomas Munro
10 59 Andres Freund
11 56 Heikki Linnakangas
12 48 Robert Haas
....
- 12. © 2021 NTT DATA Corporation 12
12
© 2021 NTT DATA Corporation
2020年の(コミッタ所属の)会社別のコミット数
1 690 Crunchy Data (4)
2 626 EnterpriseDB (6)
3 300 VMWare (3)
4 212 Microsoft (4)
5 108 NTT Data (1)
6 93 Fujitsu (1)
7 53 Unknown (3)
8 48 Postgres Professional (2)
9 31 Redpill Linpro (1)
10 8 NTT (1)
10 8 University of Cambridge (1)
12 2 SRA OSS (1)
13 1 credativ (1) ※2020年のコミッタ別のコミット数について、
2020年末時点のコミッタの所属企業ごとに集計
- 13. © 2021 NTT DATA Corporation 13
13
© 2021 NTT DATA Corporation
2020年によく更新されたドキュメント
$ git diff 7559d8ebfa 32d6287d2e --stat | grep "¥.sgml" |
sort -k 3 -n -r | head -5
doc/src/sgml/func.sgml | 34376 +++++++++++--------
doc/src/sgml/catalogs.sgml | 10495 +++---
doc/src/sgml/monitoring.sgml | 7795 +++--
doc/src/sgml/information_schema.sgml | 6549 ++--
doc/src/sgml/glossary.sgml | 1962 ++
2020年に更新の多かったドキュメント、トップ5
関数やカタログ、統計情報ビューなどの
一覧表についてフォーマットが大幅変更
- 14. © 2021 NTT DATA Corporation 14
14
© 2021 NTT DATA Corporation
関数やカタログ、統計情報ビューなどの一覧表のフォーマット変更
v12以前
v13以降
※https://www.postgresql.org/docs/12/functions-math.html
※https://www.postgresql.org/docs/13/functions-math.html
- 15. © 2021 NTT DATA Corporation 15
15
© 2021 NTT DATA Corporation
2020年によく更新されたドキュメント
$ git diff 7559d8ebfa 32d6287d2e --stat | grep "¥.sgml" |
sort -k 3 -n -r | head -5
doc/src/sgml/func.sgml | 34376 +++++++++++--------
doc/src/sgml/catalogs.sgml | 10495 +++---
doc/src/sgml/monitoring.sgml | 7795 +++--
doc/src/sgml/information_schema.sgml | 6549 ++--
doc/src/sgml/glossary.sgml | 1962 ++
2020年に更新の多かったドキュメント、トップ5
用語集がドキュメントに追加
- 16. © 2021 NTT DATA Corporation 16
16
© 2021 NTT DATA Corporation
用語集
※https://www.postgresql.org/docs/13/glossary.html
- 17. © 2021 NTT DATA Corporation 17
17
© 2021 NTT DATA Corporation
2020年によく更新されたソースファイル
$ git diff 7559d8ebfa 32d6287d2e --stat | grep -E "¥.[chy]" |
sort -k 3 -n -r | head -5
src/include/common/unicode_norm_table.h | 7955 ++---
src/include/common/unicode_normprops_table.h | 7775 +++++
src/backend/commands/copy.c | 4683 +--
src/include/common/unicode_norm_hashfunc.h | 2932 ++
src/backend/utils/adt/multirangetypes.c | 2790 ++
2020年に更新の多かったソースファイル、トップ5
Unicode文字列を正規化するためのルールなどを保持。
Unicodeデータのアップデートでソースを大量更新
- 18. 18
© 2020 NTT DATA Corporation
Unicode文字列の正規化関数
v13から、normalize関数を使って、Unicode文字列を正規化可能に!
=# SELECT normalize('アイウエオ', NFKC);
正規化対象の文字列 正規化形式
• NFC (デフォルト)
• NFD
• NFKC
• NFKD
- 19. 19
© 2020 NTT DATA Corporation
Unicode文字列のNFKCでの正規化例
=# SELECT normalize('アイウエオ', NFKC);
normalize
------------
アイウエオ
(1 row)
=# SELECT normalize('AbCdE123', NFKC);
normalize
-----------
AbCdE123
(1 row)
=# SELECT normalize('㌢㋿㊨⑤Ⅷ㈲', NFKC);
normalize
-----------------------
センチ令和右5VIII(有)
(1 row)
半角カタカナを全角カタカナに変換
全角英数字を半角英数字に変換
記号や環境依存文字を変換
- 20. © 2021 NTT DATA Corporation 20
20
© 2021 NTT DATA Corporation
最後に - 2021年の目標
$ git shortlog -s -n | head -18 | nl
1 14660 Tom Lane
2 13637 Bruce Momjian
3 4762 Peter Eisentraut
4 2181 Robert Haas
5 1527 Alvaro Herrera
6 1491 Marc G. Fournier
7 1398 Heikki Linnakangas
~
15 519 Vadim B. Mikheev
16 453 Simon Riggs
17 414 Tatsuo Ishii
18 400 Fujii Masao
全期間のコミッタ別のコミット数 (2021-01-21時点)
2021年でコミット数500の大台に!!できれば。。
- 21. © 2020 NTT DATA Corporation
その他、記載されている会社名、商品名、又はサービス名は、
各社の登録商標又は商標です。