733
技術社區[雲棲]
PostgreSQL 俄羅斯發行版Postgrespro的特性
標簽
PostgreSQL , postgrespro , oleg
背景
Postgrespro是俄羅斯的一家數據庫公司,創始人OLEG是PostgreSQL社區的核心成員之一,一名在俄羅斯莫斯科國立大學,斯特恩伯格天文研究所做科學研究的天文學家。同時也擔任Postgres Professional公司的首席執行官。也是極少數登頂過珠峰的科學家。
雲棲社區關於oleg的專訪
https://yq.aliyun.com/articles/60800
postgrespro企業版本加了很多新的功能,和大多數PostgreSQL圈子的公司一樣,postgrespro也是非常開放的一家公司,社區版本吸收這些功能的可能性非常大。
https://github.com/postgrespro/
另一家俄羅斯的公司ispras也放出過非常前沿的產品,Postgres-LLVM,目前JIT已經集成到PostgreSQL社區版本了。
感謝所有為PostgreSQL社區付出的人們。
Postgrespro vs PostgreSQL
Postgres Pro Enterprise is the most actual PostgreSQL version with some additional patches applied and extensions added. Mostly, these are patches already accepted by the PostgreSQL community and committed into PostgreSQL. Also there some patches and extensions developed by Postgres Professional. Users of Postgres Pro Enterprise thus have early access to some important features and fixes.
Currently the difference between Postgres Pro Enterprise and PostgreSQL is the following:
-
Performance improvement on multicore systems (buffer manager and locks optimization)
多核性能增強(BUFFER管理和鎖管理優化) -
Full text search improvements: phrase search, hunspell morphology, some dictionaries are bundled with distribution and can be enabled by a single SQL statement, shared_ispell allowing to store dictionaries in shared memory
全文檢索增強,支持phrase搜索等。 -
Covering indexes
《PostgreSQL 10.0 preview 功能增強 - 唯一約束+附加字段組合功能索引》 -
libicu support on all platforms, providing platform-independent sort for various locales
《PostgreSQL 10.0 preview 功能增強 - 國際化功能增強,支持ICU(International Components for Unicode)》 -
pg_trgm module supporting fuzzy string comparison and substring search
支持fuzzy字符串搜索,substring搜索。(模煳、正則) -
Improved pageinspect module provides access to internal data storage structure
增強:支持觀測gin, sp-gist, gist等索引內部內容 -
sr_plan module allows to save and restore query plans
支持執行計劃的存儲和還原。通過這個可以改寫SQL的執行計劃,甚至可以把SELECT改寫成INSERT等或者完全不相關的SQL。
《PostgreSQL Oracle 兼容性之 - SQL OUTLINE插件sr_plan (保存、篡改、固定 執行計劃)》 -
dump_stat module allowing to save and restore database statistics when dumping/restoring the database
允許導出和還原統計信息,相當於將統計信息和數據分開了,這樣做的好處是做遷移可以更快。
例如pg_upgrade升級版本,可以通過這種方法直接導入統計信息。對於超級大庫,這個效率高很多。
又比如邏輯備份和還原,可以關閉autovacuum,然後通過這種方式導入統計信息。 -
jsquery module provides a specific language for effective index-supported querying of JSONB data
jsonb的擴展函數、操作符。 -
pg_variables module provides functions to work with variables of various types
內存表。
《PostgreSQL 內存表》 -
pg_pathman module provides optimized partitioning mechanism and functions to manage partitions
分區表插件,支持range,list,hash等分區方法,而且對性能損耗極小。
《PostgreSQL 9.5+ 高效分區表實現 - pg_pathman》 -
pg_query_state module provides a facility to know the current state of query execution on working backend
《官人要杯咖啡嗎? - PostgreSQL實時監測PLAN tree的執行進度 - pg_query_state》 -
pg_probackup is a backup and recovery manager
支持塊級增量備份、備份集的管理、恢複。類似Oracle RMAN。 -
mchar module provides additional data type to compatibility with Microsoft SQL Server
兼容SQL Server的數據類型。 -
fulleq module provides additional equivalence operator to compatibility with Microsoft SQL Server
兼容SQL Server的等於操作符。 -
fasttrun module provides transaction unsafe function to truncate temporary tables without growing pg_class size
outer temp table,不造成pg_class, pg_attribute的變更。
目前PG的temp table是會話級,每次使用都會擦寫pg_class, pg_attribute,產生係統表垃圾。需要autovacuum自動回收這些垃圾。 -
online_analyze module provides set of changes, which immediately update stats after INSERT, UPDATE, DELETE or SELECT INTO operations applied for affected tables
和autovacuumm的analyze工作差不多。 -
plantuner module provides hits for planner, which can do disable or enable indexes for query execution
sql hint,類似Oracle hint功能。強製設置SQL的執行計劃。 -
Added k-nearest neighbors algorithm (KNN) for SP-GiST and B-tree (See Chapter 61)
sp-gist,btree索引的KNN檢索支持。例如通過sp-gist,btree索引求某個點附近的對象,某個數值、字符串最近的對象。等。 -
Added RUM index, based on GIN, as separate module (See Section F.53)
RUM索引接口,用於多值類型、全文檢索等。支持全文檢索的附加列搜索。類似多級樹。
《PostgreSQL 全文檢索加速 快到沒有朋友 - RUM索引接口(潘多拉魔盒)》 -
WAL size has been reduced on CREATE INDEX operation in the GiST, GIN, SP-GiST
-
Added timeout for idle sessions on the server side (See idle_session_timeout)
會話超時功能。 -
Added SHA-2 algorithm for password encryption (See Section 20.3.2)
一種新的認證機製,已經添加到10的版本,認證過程更加安全。以往的版本泄露用戶密碼的md5是有問題的。
《PostgreSQL 10.0 preview 安全增強 - SASL認證方法 之 scram-sha-256 安全認證機製》
《PostgreSQL md5 對比 MySQL - 秘鑰認證》 -
Added page level compression (CFS) (See Chapter 32)
頁級壓縮。
《PostgreSQL 透明加密(TDE,FDE) - 塊級加密》 -
Added support of autonomous transactions (See Chapter 16)
支持匿名事務,以往需要通過dblink來支持類似的功能。 -
Added new optional background worker to schedule tasks by rules (See pgpro_scheduler)
支持數據庫任務調度。類似Oracle的JOB或scheduler功能。
以往需要通過pgagent來實現,或者通過係統的調度如crontab來實現。 -
Added support for relocatable tables (See pg_transfer)
文件級表傳輸特性。例如需要將一個表拷貝到其他數據庫實例,不需要導出導入,直接拷貝文件。
《PostgreSQL 的表傳輸功能》
如果能做到庫級,那麼就類似Oracle 12C的PDB了,可以熱插拔數據庫。
加上庫級物理恢複,則可以做到更強的插拔體驗。 -
Extension pg_hint_plan has been added
同樣是一個SQL HINT插件。
《關鍵時刻HINT出彩 - PG優化器的參數優化、執行計劃固化CASE》 -
Transaction IDs on 64-bit platforms use 64-bit data type
終於支持64位xid了,不再需要freeze了。雖然PG 10的freeze在靜態表層麵已經基本不耗費資源了。 -
Lazy placement of temporary tables on disk
-
Consistent read on slaves (wait for WAL apply, see WAITLSN)
備庫lsn柵欄,可以做到備庫的讀一致性。
《PostgreSQL 10.0 preview 功能增強 - slave支持WAITLSN 'lsn', time;用於設置安全replay柵欄》 -
Utility pg_repack has been added
收縮空間的工具,比vacuum full的鎖時間更短,類似mysql online ddl.
《PostgreSQL 收縮膨脹表或索引 - pg_squeeze or pg_repack》 -
Added multimaster extension
multi master,無需多言,很牛逼的功能。 -
Added failover algorithm for libpq connections
libpq支持配置多主機,以及failover算法。 -
Added aqo extension for adaptive query optimization
基於機器學習算法的優化器功能。
《數據庫優化器原理 - 如何治療選擇綜合症》 -
Implemented declarative syntax for partitioning. (See Section F.38.2.6.)
支持創建分區表。 -
Added mamonsu monitoring service, which is implemented as a Zabbix agent. (See mamonsu.)
支持zabbix agent。 -
Added pg_wait_sampling extension for sampling-based statistics of wait events. With this extension, you can get an insight into the server activity, including the current wait events for all processes and background workers.
支持等待事件的采樣分析。 -
pg_tsparser module is an alternative text search parser.
新增一個全文檢索parser: pg_tsparser。
Postgres Pro Enterprise releases are following the PostgreSQL releases, though sometimes occur more frequently. The Postgres Pro Enterprise versioning scheme is based on the PostgreSQL one and has an additional decimal place.
參考
https://postgrespro.com/docs/postgresproee/9.6/intro-pgpro-vs-pg.html
最後更新:2017-09-18 00:04:23