Hi @njnjkkl,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
We apologize for the inconvenience caused to you.
We would like to inform you that, online migration makes use of pgcopydb follow, and some of the logical decoding restrictions apply. We also recommend that you have a primary key in all the tables of a database that's undergoing online migration. If a primary key is absent, the deficiency results in only insert operations being reflected during migration, excluding updates or deletes. Add a temporary primary key to the relevant tables before you proceed with the online migration.
Note: In the case of online migration of tables without a primary key, only insert operations are replayed on the target. This can potentially introduce inconsistency in the database if records that are updated or deleted on the source don't reflect on the target.
An alternative is to use the ALTER TABLE command where the action is REPLICA IDENTIY with the FULL option. The FULL option records the old values of all columns in the row so that even in the absence of a primary key, all CRUD operations are reflected on the target during the online migration. If none of these options work, perform an offline migration as an alternative.
Note: For online migration with Azure Database for PostgreSQL single server, the Azure replication support is set to logical under the replication settings of the single server page in the Azure portal. And also, Change the password_encryption server parameter on your flexible server from SCRAM-SHA-256 to MD5 before initiating the migration. This is essential for the existing credentials on single server to work on your flexible server.
Here are the links of some parallel threads that might help you:
https://learn.microsoft.com/en-us/answers/questions/1607293/error-during-online-migration-of-postgres-single-s
Please refer to the below mentioned links for more information.
https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/best-practices-migration-service-postgresql#online-migration
https://pgcopydb.readthedocs.io/en/latest/ref/pgcopydb_follow.html#pgcopydb-follow
https://www.postgresql.org/docs/current/logical-replication-restrictions.html
https://learn.microsoft.com/en-us/azure/postgresql/migrate/whats-happening-to-postgresql-single-server#migrate-from-azure-database-for-postgresql-single-server-to-azure-database-for-postgresql-flexible-server
I hope, This response will address your query and helped you to overcome on your challenges.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.