tencent_failover_slot, a plugin for users to create failover slots, convert them to non-failover slots, view failover slot information, and delete failover slots. At the same time, GUC parameters are added to help you configure for abnormal situations. The details are as follows.create extension tencentdb_failover_slot;--Create a plugin firstselect pg_create_logical_failover_slot('slotname','pluginname');--Create a failover slot
tencentdb_failover_slot plugin.pg_create_logical_failover_slot function contains two parameters:select transform_slot_to_nonfailover('slotname');
postgres=# select * from pg_failover_slots;slot_name-----------------fsfsg(2 rows)
pg_failover_slots view contains a column showing the names of all current failover slots. For more information about failover slots, go to the pg_replication_slots view.select * from pg_drop_replication_slot('slotname');
failover_slot_timeline_diverged_option with the type of enum, which is convenient for you to configure for abnormal situations. You can log in to the TencentDB for PostgreSQL console, and configure this parameter on Instance Details > Parameter Settings. The default value of this parameter is error, and the optional values are error and rewind. In extreme cases, the log receiving speed of the standby database is slower than that of logical replication and the HA switch occurs. If error is set as the value, it means that logical replication will be paused, and both the publisher and subscriber can receive an error report and wait for you to process it. If the value is set to rewind, the logical replication will start from the time point when the switch is performed.Feedback