v2.0
- About PTK
- Quick Start
- Guidance
- Preparing Configuration File
- Checking the System
- Deploy Database Cluster
- Manage Clusters
- Show Cluster List
- Show Cluster Status
- Start Database
- Stop Database
- Restart Database
- Rebuild Database
- Switchover
- Failover
- Show Plugin Information
- Install Plugins
- Upgrade Database
- Scale-out Cluster
- Scale-in Cluster
- Show Database HBA
- Set Database HBA
- Show Database Parameters
- Set Database Parameters
- Show Cluster Topology Configuration
- Show Cluster Meta Information
- Update Cluster Comment
- Update Database IP
- Role Management
- Install CM
- Uninstall CM
- Manage Cluster VIP
- Install MogHA Service
- Uninstall MogHA Service
- Rename Cluster
- Create Empty Cluster
- Throw Out A Node
- Takeover A Node
- Manage Cluster
- Uninstall Database Cluster
- Collect OS Information
- Download MogDB Installer
- Encrypt Sensitive Information
- Upgrade PTK
- PTKC
- Compatible With Higher Versions of MogDB
- Reference
- Samples of Configuration Files
- Commands
- ptk
- ptk completion
- ptk view-static-config
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster createdb
- ptk cluster uninstall-compat-tools
- ptk cluster install-compat-tools
- ptk cluster install-mogila
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- Troubleshooting
- FAQ
- Release Notes
- Community
- Appendix: YAML Syntax
Recommended Value of GUC Parameters
Description of Recommended Values
When PTK installs MogDB, it will automatically optimize and modify the database parameter values according to the server's configuration by default. The specific parameters that will be modified vary from version to version, and you can check them with this command:
# Replace MogDB-VERSION with the specific MogDB version number
ptk rec-guc <MogDB-VERSION>
# You can also compare the differences by specifying two version numbers at the same time (up to two version numbers are supported at the same time)
ptk rec-guc <VERSION1> <VERSION2>
If you do not want PTK to optimize parameter values, you can specify the --default-guc
option when installing the database cluster. With this option specified, PTK maintains the database defaults for all parameters during installation, except for configuring the Required Parameters.
Notes
- PTK optimizes parameter values for MogDB and Uqbar databases only, other databases of the same type are installed with default parameter values.
- If a parameter with the same name as the Optimized Parameters is configured in the
db_conf
section of the configuration file, the parameter configured indb_conf
will take effect. - When deploying a database with less than 4G server memory, all Optimized Parameters will maintain the database defaults.
Required Parameters
When there is only one database instance in the deployed cluster, PTK enables maximum available mode by adding
most_available_sync=on
to the required parameters.
parameter | value |
---|---|
local_bind_address | The host field in the db_servers section of the PTK configuration file |
port | The db_port field in the db_servers section of the PTK configuration file |
application_name | The node name assigned to the instance by PTK, e.g. db_6001 |
available_zone | The az_name field in the db_servers section of the PTK configuration file |
unix_socket_directory | The tmp_dir field in the PTK configuration file |
unix_socket_permissions | 0700 |
log_file_mode | 0600 |
ssl | off |
ssl_cert_file | server.crt |
ssl_key_file | server.key |
ssl_ca_file | cacert.pem |
log_directory | pg_log/$application_name of $log_dir in the PTK configuration file |
audit_directory | pg_audit/$application_name of $log_dir in the PTK configuration file |
listen_addresses | * |
max_wal_senders | 16 |
Optimized Parameters
Parameters related to memory size (assuming memory size N in GB)
- When 4 < N <= 8
parameter | value |
---|---|
max_connections | 500 |
max_prepared_transactions | 500 |
max_process_memory | (0.6*N)GB |
shared_buffers | (0.2*N)GB |
work_mem | 16MB |
maintenance_work_mem | 512MB |
wal_buffers | 128MB |
- When 8 < N <= 64
parameter | value |
---|---|
max_connections | 1000 |
max_prepared_transactions | 1000 |
max_process_memory | (0.7*N)GB |
shared_buffers | (0.2*N)GB |
work_mem | 32MB |
maintenance_work_mem | 1GB |
wal_buffers | 512MB |
- When N > 64
parameter | value |
---|---|
max_connections | 3000 |
max_prepared_transactions | 3000 |
max_process_memory | (0.8*N)GB |
shared_buffers | (0.3*N)GB |
work_mem | 64MB |
maintenance_work_mem | 2GB |
wal_buffers | 1GB |