2016-08-04 121 views
1

我正在測試Postgres-XL 9.5r1.2。我使用gtm,coord1,datanode1,datanode2構建了一個羣集。Postgres-XL發生錯誤:已達到準備交易的最大數量

我用pgbench下面的命令來測試其性能:

pgbench -h db -U postgres -i -s 100 testdb; 
pgbench -h db -U postgres -c 70 -t 40 -r testdb 

在測試結果,下面的錯誤發生多次

Client NN aborted in state 13: ERROR: maximum number of prepared transactions reached 
HINT: Increase max_prepared_transactions (currently 10). 

所以,看來我需要調整max_prepared_transactions

我的問題是,我應該在哪個主機上調整postgresql.confcoord1datanode1datanode2?還是還有什麼?

回答

2

您可以在postgres.conf兩個協調和數據節點max_prepared_transactions,但它需要進行不同的設置:

  • 對於數據節點:數據節點的max_connections

  • 對於協調者:至少是集羣中協調者的數量。

查看Postgres-XL docs

注意max_connections也需要進行協調和數據節點進行不同的設置:

  • 對於數據節點:所有協調員max_connections總和。

  • 對於協調者:從客戶端應用程序接受的連接數。