Dropping a Replica
This section explains how to completely stop replication for a specific replica by dropping it. You may need to run this procedure if you make a mistake with your replication setup and you want to start again, or if you run into a problem that requires troubleshooting.
- On the source system, pause replication for a specific replica. You can do this in the SMC or with a SQL command. For example:
premdb=# alter database premdb alter replica premdb_replica pause;
PAUSE REPLICA
- On the source system, drop the replica. For example:
premdb=# alter database premdb drop replica premdb_replica;
DROP REPLICA
- On the target system, take the target database out of
HOT_STANDBY
mode. For example:
yellowbrick=# alter database premdb_replicated set hot_standby off;
WARNING: This database will no longer accept restore and replication operations
ALTER DATABASE
- On the target system, start using the target database as a regular active database (reads and writes) or drop the database. For example:
yellowbrick=# drop database premdb_replicated;
DROP DATABASE
Note: Before dropping the database, you may want to take a full backup.
Now you are in a position to set up replication again, using the same source database. Note that the remote server and any other replicas are still intact.
Parent topic:Managing Replication