在GPDB中,Master和每個Segment Instance都有自己的postgresql.conf檔案。一些參
數為本地化參數,意味著每個Segment Instance都根據自己的postgresql.conf檔案來獲
取參數的值。對於本地化參數來說,必須在系統中的每個Instance(Master和Segment)
配置。
配置修改要 在GPDB系統所有的postgresql.conf檔案修改參數,可以使用gpconfig命令。
例如:
$ gpconfig -c gp_vmem_protect_limit -v 4096MB
然後重啟GPDB以確保修改的配置生效:
$ gpstop –r
會話級參數設定=# SET work_mem TO '200MB';
=# RESET work_mem;
查看master配置參數設定[gpadmin@mdw ~]$ psql libo -c 'show all;'
查看系統配置參數gpconfig[gpadmin@mdw ~]$ gpconfig --show max_connectionsValues on all segments are consistentGUC : max_connectionsMaster value: 250Segment value: 750
記憶體消耗參數
這些參數空值著系統記憶體的使用。可以通過調整gp_vmem_protect_limit避免運行
查詢處理時Segment主機出現記憶體溢出。
gp_vmem_idle_resource_timeout
gp_vmem_protect_limit
gp_vmem_protect_segworker_cache_limit
max_appendonly_tables
max_prepared_transactions
max_stack_depth
shared_buffers
temp_buffers