PostgreSQL10.0preview功能增強-邏輯訂閱端控制引數解說
標籤
PostgreSQL , 10.0 , 邏輯訂閱
背景
PostgreSQL 邏輯訂閱相關文章請參考
《PostgreSQL 10.0 preview 變化 – 邏輯複製pg_hba.conf變化,不再使用replication條目》
《PostgreSQL 10.0 preview 功能增強 – 備庫支援邏輯訂閱,訂閱支援主備漂移了》
《PostgreSQL 10.0 preview 功能增強 – 邏輯複製支援並行COPY初始化資料》
《PostgreSQL 10.0 preview 邏輯複製 – 原理與最佳實踐》
另外10.0新增了兩個引數,用於控制訂閱端的併發。
19.6.4. Subscribers
These settings control the behavior of a logical replication subscriber. Their values on the publisher are irrelevant.
Note that wal_receiver_timeout and wal_retrieve_retry_interval configuration parameters affect the logical replication workers as well.
1. 訂閱端允許同時啟動多少個用於apply與初始表同步的worker程式。
apply指流式同步的worker
初始表同步指邏輯訂閱初始化COPY源端資料的worker程式。
- max_logical_replication_workers (int)
Specifies maximum number of logical replication workers.
This includes both apply workers and table synchronization workers.
Logical replication workers are taken from the pool defined by max_worker_processes.
The default value is 4.
2. 每個訂閱允許的初始化COPY源端資料的併發數,(即同一個訂閱,允許開啟多少個併發,從源端COPY初始資料到訂閱端。)
- max_sync_workers_per_subscription (integer)
Maximum number of synchronization workers per subscription.
This parameter controls the amount of paralelism of the initial data copy during the subscription initialization or when new tables are added.
Currently, there can be only one synchronization worker per table.
The synchronization workers are taken from the pool defined by max_logical_replication_workers.
The default value is 2.
patch如下
Add max_sync_workers_per_subscription to postgresql.conf.sample.
author Fujii Masao <fujii@postgresql.org>
Tue, 11 Apr 2017 23:10:54 +0800 (00:10 +0900)
committer Fujii Masao <fujii@postgresql.org>
Tue, 11 Apr 2017 23:10:54 +0800 (00:10 +0900)
commit ff7bce174390ae063c122ab04020bd4ee070d6ad
tree 12fdc01bc99123086e3693049174dcebd4a06f8b tree | snapshot
parent 1c1a4726eba5bb8c0772db8a8efe0315d71887fb commit | diff
Add max_sync_workers_per_subscription to postgresql.conf.sample.
This commit also does
- add REPLICATION_SUBSCRIBERS into config_group
- mark max_logical_replication_workers and max_sync_workers_per_subscription
as REPLICATION_SUBSCRIBERS parameters
- move those parameters into "Subscribers" section in postgresql.conf.sample
Author: Masahiko Sawada, Petr Jelinek and me
Reported-by: Masahiko Sawada
Discussion: http://postgr.es/m/CAD21AoAonSCoa=v=87ZO3vhfUZA1k_E2XRNHTt=xioWGUa+0ug@mail.gmail.com
這個patch的討論,詳見郵件組,本文末尾URL。
PostgreSQL社群的作風非常嚴謹,一個patch可能在郵件組中討論幾個月甚至幾年,根據大家的意見反覆的修正,patch合併到master已經非常成熟,所以PostgreSQL的穩定性也是遠近聞名的。
參考
相關文章
- PostgreSQL10.0preview功能增強-邏輯複製支援並行COPY初始化資料SQLView並行
- PostgreSQL10.0preview功能增強-國際化功能增強,支援ICU(InternationalComponentsforUnicode)SQLViewUnicode
- PostgreSQL10.0preview功能增強-增加ProcArrayGroupUpdate等待事件SQLView事件
- 使用PostgreSQL邏輯訂閱實現multi-masterSQLAST
- PostgreSQL10.0preview功能增強-OLAP增強向量聚集索引(列儲存擴充套件)SQLView索引套件
- PostgreSQL10.0preview功能增強-CLOGoldestXID跟蹤SQLViewGo
- PostgreSQL10.0preview功能增強-回滾範圍可精細控制(事務、語句級)SQLView
- 編碼規範:不要用引數控制程式碼邏輯
- PostgreSQL10.0preview功能增強-JSON內容全文檢索SQLViewJSON
- PostgreSQL10.0preview功能增強-後臺執行(pg_background)SQLView
- PostgreSQL10.0preview功能增強-客戶端ACL(pg_hba.conf動態檢視)SQLView客戶端
- PostgreSQL10.0preview效能增強-hashindexmetapagecache、高併發增強SQLViewIndex
- PostgreSQL10.0preview功能增強-自由定義統計資訊維度SQLView
- java邏輯控制Java
- PostgreSQL10.0preview功能增強-觸發器函式內建中間表SQLView觸發器函式
- PostgreSQL邏輯訂閱-給業務架構帶來了什麼希望?SQL架構
- Java MQTT訂閱端,可訂閱萬用字元(/#)JavaMQQT字元
- PostgreSQL10.0preview功能增強-兩段式索引(約束欄位+附加欄位)SQLView索引
- PostgreSQL10.0preview效能增強-分割槽表效能增強(plan階段加速)SQLView
- PostgreSQL10.0preview功能增強-序列隔離級別預加鎖閾值可控SQLView
- Linux下邏輯測試語句引數和流程控制語句 if語句Linux
- PostgreSQL10.0preview效能增強-間接索引(secondaryindex)SQLView索引Index
- PostgreSQL10.0preview效能增強-支援64bitatomicSQLView
- java語言邏輯類、引數類和字元類Java字元
- iOS訂閱詳解iOS
- 強業務邏輯抽象API介面抽象API
- S/4HANA生產訂單增強WORKORDER_UPDATE方法BEFORE_UPDATE引數分析
- Java基礎之邏輯控制Java
- angular2 的邏輯控制Angular
- PostgreSQL10.0preview效能增強-OLAP提速框架,FasterExpressionEvaluationFramework(含JIT)SQLView框架ASTExpressFramework
- 2、從引數估計的角度理解邏輯迴歸邏輯迴歸
- MySQL 5.7 自增欄位相關引數說明MySql
- Oracle12c功能增強 新特性之管理功能的增強Oracle
- PostgreSQL10.0preview功能增強-更強可靠性,過去式事務狀態可查(杜絕unknown事務)SQLView
- 01.Python邏輯控制流Python
- PostgreSQL10.0preview功能增強-動態檢視pg_stat_activity新增資料庫管理程式資訊SQLView資料庫
- 遊戲訂閱哪家強? OpenCritic做了個統計遊戲
- 邏輯代數基礎