- 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
Install Plugins
Overview
In order to meet the demand for functional diversity, MogDB provides a variety of feature-rich plugins. At the same time, PTK also supports one-click installation of these plugins, so that users can quickly use the plugin functions.
List of Plugins
- postgis
- pg_bulkload
- pg_prewarm
- pg_repack
- pg_trgm
- wal2json
- whale
- oracle_fdw
- mysql_fdw
- postgres_fdw
- dblink
- orafce
Installation Demonstration
Installation command:
ptk cluster -n <CLUSTER_NAME> install-plugin [-H|--host HOST] [-p|--pkg PKG_PATH] [-P|--plugin PLUGIN_NAME] [--override] [--skip-check-version]
options:
option name | option type | description |
---|---|---|
-H|--host | String Array | Specify the IPs of the hosts to be installed, which will be installed to all hosts in the cluster by default. |
-p|--pkg | String | Specify the path of the plugin package, you can specify the local plugin package or the URL. |
-P|--plugin | String Array | Specify the name of the plugin to install, all plugins will be installed by default. |
--override | Bool | Whether or not to overwrite existing plugin files. |
--skip-check-version | Bool | Skip checking if the database version matches the plugin version. |
QA
Which version of the plugin is installed by default?
PTK does plugin adaptation according to the version number of the current cluster. If -p
is not specified, the default plugin version is the same as the version of the current cluster database; if -p
is specified, the plugin version is the version number of the specified package.
How can I check that the plugin has been successfully installed?
- You can confirm whether the plugin has been installed successfully based on whether the above installation command is executed successfully or not.
- List plugins according to Show Plugin Information.
How to enable plugins?
Execute the following command to link to the target database:
gsql -r -d <DATABASE_NAME>
Use the following command to create the extension:
CREATE Extension <EXTENSION_NAME>
What is --override
used for? When should it be used?
Usage: --override
means that for plugins that have already been installed, if the plugin installation is executed again, it will directly overwrite the corresponding files of the original plugin, and will no longer interact with the user to confirm one by one.
When to use: There may be cases where the plugin version number is inconsistent with the database version number, which may result in the database not being able to properly enable plugin, so this option can be used when installing.
What is --skip-check-version
used for? When should I use it?
Usage: When PTK installs a plugin, it parses the version number in the plugin package and determines whether it matches the version number of the current database, and reports an error if it does not. The purpose of -skip-check-version
is to skip this validation.
When to use:
- Need to test installing plugins that do not match the current database version.
- If there is no corresponding plugin package released for a particular MogDB version, you can use this option to skip the validation and install another version of the plugin.
Can I uninstall a plugin that is already installed?
Not supported.
Can an extension already created in the database be deleted?
Execute the following command to link to the target database:
gsql -r -d <DATABASE_NAME>
Use the following command to delete an extension that has already been created:
DROP Extension <EXTENSION_NAME>