Configuration Method for a Synchronization Task from GaussDB Distributed in Single-Task Mode
Method 1: Modify the configuration file.
Procedure
- Log in to all nodes of the distributed GaussDB instance.
- Query the location of the configuration file.
find / -name "pg_hba.conf" Or find / -name "gs_hba.conf"
- Open the pg_hba.conf file. Retain sha256 and insert trust of the specified single-mode task user in the line above sha256.
- Run the following statement as a system administrator on the source database or restart the DB instance to apply the change:
select pg_reload_conf();
Method 2: Use gs_guc.
- For a cloud database, run the following command to access the sandbox. For a self-built database, run the source gauss_env_file command to configure the environment variable file.
Log in to any database node, switch to user Ruby, and run the su - Ruby command.
- Versions earlier than 2.0 (V500R002C00)
/usr/sbin/chroot /var/chroot /bin/bash source /etc/profile && source ~/.bashrc
- 2.0 (V500R002C00) and later versions
chroot /var/chroot source /etc/profile; source /home/Ruby/.bashrc ;source /home/Ruby/gauss_env_file
To change a GaussDB instance on Huawei Cloud, you need to contact the database on-call personnel.
- Versions earlier than 2.0 (V500R002C00)
- If only the single-task mode is used, the drs1 user is used as an example.
gs_guc reload -Z coordinator -N all -I all -h "host all drs1 0.0.0.0/0 sha256"
gs_guc reload -Z coordinator -N all -I all -h "host replication drs1 0.0.0.0/0 sha256"
Configure the replication connection between the CN and DN. The following uses network segment 192.168.0.0/16 of the CN as an example.
gs_guc reload -Z datanode -N all -I all -h 'host replication drs1 192.168.0.0/16 trust'
If only the multi-task mode is used, the drs2 user is used as an example.
gs_guc reload -Z datanode -Z coordinator -N all -I all -h "host all drs2 0.0.0.0/0 sha256"
gs_guc reload -Z datanode -N all -I all -h 'host replication drs2 0.0.0.0/0 sha256'
If you use both the multi-task and single-task modes for the same source instance, you are advised to plan migration users and configure the task as required.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot