TAG 13
作者
digoal
日期
2017-04-20
标签
PostgreSQL , 10.0 , radix tree , 字符编码转换
背景
PostgreSQL 10.0 使用radix tree提升UTF-8与其他字符编码转换的性能。
编码map文件按新的radix tree编排,性能相比binary search好了很多。
```
Use radix tree for character encoding conversions.
author Heikki Linnakangas heikki.linnakangas@iki.fi
Mon, 13 Mar 2017 18:46:39 +0000 (20:46 +0200)
committer Heikki Linnakangas heikki.linnakangas@iki.fi
Mon, 13 Mar 2017 18:46:39 +0000 (20:46 +0200)
Replace the mapping tables used to convert between UTF-8 and other
character encodings with new radix tree-based maps. Looking up an entry in
a radix tree is much faster than a binary search in the old maps. As a
bonus, the radix tree representation is also more compact, making the
binaries slightly smaller.
The "combined" maps work the same as before, with binary search. They are
much smaller than the main tables, so it doesn't matter so much. However,
the "combined" maps are now stored in the same .map files as the main
tables. This seems more clear, since they're always used together, and
generated from the same source files.
Patch by Kyotaro Horiguchi, with lot of hacking by me at various stages.
Reviewed by Michael Paquier and Daniel Gustafsson.
Discussion: https://www.postgresql.org/message-id/20170306.171609.204324917.horiguchi.kyotaro%40lab.ntt.co.jp
```
这个patch的讨论,详见邮件组,本文末尾URL。
PostgreSQL社区的作风非常严谨,一个patch可能在邮件组中讨论几个月甚至几年,根据大家的意见反复的修正,patch合并到master已经非常成熟,所以PostgreSQL的稳定性也是远近闻名的。
参考
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=aeed17d00037950a16cc5ebad5b5592e5fa1ad0f
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.
9.9元购买3个月阿里云RDS PostgreSQL实例
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.





