I've solved the issue dropping the extension on the source server before migration and re-CREATE it after migration on target database.
Azure Database for PostgreSQL flexible server > Migration issue
I'm trying to migrate an onprem PostgreSQL 16 database to an Azure database from PostgreSQL flexible server and I'm having the following problem:
However, trying to run the command
CREATE EXTENSION postgis_tiger_geocoder;
from Dbeaver to destination database does not cause any errors.
I added the following extensions to the server
and also I changed search_path and shared_preload_libraries
Thanks to anyone who can help me
Azure Database for PostgreSQL
3 answers
Sort by: Most helpful
-
-
Pasquale Ceglie 0 Reputation points2026-01-20T11:00:39.9066667+00:00 Hi @Pilladi Padma Sai Manisha thanks for your detailed reply.
What do you mean with "To proceed, make sure the extension already exists in the target database before rerunning validation, and then configure the migration to move only schema and data, excluding extension creation"
Using native migration tool in flexible server I cannot exclude estensions. Tool requires only source and target database.I cannot temporarily remove the extension from source database.
I tried to manually add the extension and relaunch the migration but the problem remainsThanks for your support
-
Pilladi Padma Sai Manisha 3,875 Reputation points Microsoft External Staff Moderator
2026-01-20T10:49:54.7266667+00:00 Hi Pasquale Ceglie,
Thanks for the detailed information and screenshots. This behavior is expected during Azure Database Migration Service (DMS) validation and is not caused by an issue in your PostgreSQL Flexible Server configuration.Although
postgis_tiger_geocoderis enabled at the server level and you can successfully runCREATE EXTENSION postgis_tiger_geocoder;manually from DBeaver, DMS runs its own pre-validation using a restricted migration identity and a fixed execution order. During this step, DMS always attempts to create required extensions itself. Forpostgis_tiger_geocoder, this can fail because the extension has hard dependencies on other PostGIS components and internal objects, and DMS does not always detect that the extension already exists. The migration identity used by DMS also does not have the same effective privileges or search path context as an interactive user session.This explains why manual creation of the extension succeeds while the DMS validation reports “Unable to create postgis_tiger_geocoder extension(s)”. Your
azure.extensionsconfiguration is correct, and changingshared_preload_librariesis not required for PostGIS or the tiger geocoder. This is also not related to PostgreSQL 16 compatibility.To proceed, make sure the extension already exists in the target database before rerunning validation, and then configure the migration to move only schema and data, excluding extension creation. Alternatively, you can temporarily remove the tiger geocoder extension from the source, complete the migration, and recreate it manually on the target after the migration finishes.
postgis_tiger_geocoderis supported on Azure Database for PostgreSQL Flexible Server, and the error is a limitation of the DMS validation process rather than a problem with your setup. Continuing the migration after pre-creating the extension or excluding it from migration will allow it to complete successfully.