Help Center/ Data Replication Service/ Troubleshooting/ Failure Cases/ Real-Time Synchronization from PostgreSQL to PostgreSQL/ Full Synchronization Error: function uuid_generate_v4() does not exist
Updated on 2022-09-21 GMT+08:00

Full Synchronization Error: function uuid_generate_v4() does not exist

Scenarios

During full synchronization, an error is reported, and the log information is as follows: service DATAMOVE failed, cause by: apply event=[type=table_structure, index= %s, schema_name= %s, object_name= %s] occur error, msg=ERROR: function uuid_generate_v4() does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts.

Possible Causes

  • The destination database does not have the uuid-ossp extension, and uuid_generate_v4() is the function of this extension.

    Log in to the destination RDS PostgreSQL database and run the following SQL statement:

    select * from pg_extension where extname = 'uuid-ossp';

Solution

Extensions are not synchronized. Before synchronization, install the corresponding extension in the destination database. Perform the following steps to install the extension on the destination database and retry the DRS task:

  1. Log in to the destination RDS PostgreSQL database as the root user.
  2. Run the following SQL statement to install uuid-ossp:

    create extension "uuid-ossp";

  3. Retry the DRS task.