Cannot grant REPLICATION attribute to admin user on Flexible Server (PostgreSQL 14) — needed for DMS migration

Bruno Godoi 20 Pontos de reputação
2026-02-26T13:10:45.32+00:00

Environment:

  • Azure Database for PostgreSQL — Flexible Server
    • PostgreSQL version: 14.20
    • Admin user: adopt (created at server provisioning)
    • wal_level: logical
    • max_replication_slots: 10
    • max_wal_senders: 10

Problem:

I need to migrate my database from Azure PostgreSQL Flexible Server to AWS using AWS DMS (Database Migration Service). DMS requires the source user to have the REPLICATION attribute to establish logical replication. However, I cannot grant REPLICATION to any role. All of the following fail with permission denied:

-- Attempt 1: ALTER existing admin user

ALTER ROLE adopt WITH REPLICATION;

-- ERROR: permission denied

-- Attempt 2: SET ROLE to azuresu

SET ROLE azuresu;

-- ERROR: permission denied to set role "azuresu"

-- Attempt 3: SET ROLE to azure_pg_admin, then ALTER

SET ROLE azure_pg_admin;

ALTER ROLE adopt WITH REPLICATION;

-- ERROR: permission denied

-- Attempt 4: Create a new role with REPLICATION

SET ROLE azure_pg_admin;

CREATE ROLE dms_user WITH LOGIN PASSWORD '***' REPLICATION;

-- ERROR: permission denied to create role

Current role attributes:

Role rolsuper 2 rolreplication rolcreaterole
azuresu true true true
azure_pg_admin false false false
adopt false false true

The admin user adopt is a member of azure_pg_admin, but azure_pg_admin itself does not have rolreplication. I understand that in PostgreSQL 14, only a superuser can grant the REPLICATION attribute, and azuresu is not accessible to customers.


AWS DMS error:

Last Error: Unable to use plugins to establish logical replication on source PostgreSQL instance. Follow all prerequisites for 'PostgreSQL as a source in DMS' from https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html

Stop Reason: FATAL_ERROR

What I've tried:

  • Confirmed wal_level = logical is active (SHOW wal_level returns logical)
  • All tables have primary keys
  • Server parameters for replication are properly configured
  • Tested creating a replication slot manually — fails with "must be superuser or replication role to use replication slots"

Request: Could Microsoft support grant the REPLICATION attribute to the admin user adopt (or to azure_pg_admin) via the internal azuresu role? This is required for logical replication to work with AWS DMS. Alternatively, is there another supported method to enable logical replication for migration purposes on Flexible Server with PostgreSQL 14?

Banco de Dados do Azure para PostgreSQL

1 resposta

Classificar por: Mais útil
  1. Pilladi Padma Sai Manisha 11,715 Pontos de reputação Equipe Externa da Microsoft Moderador
    2026-02-26T15:12:38.57+00:00

    Oi Bruno Godoi,
    O Grupo de Produto confirmou que esse comportamento é intencional no Azure PostgreSQL Flexible Server. Conceder o atributo REPLICATION ou acesso de nível superusuário não é suportado, o que impede o uso do AWS DMS como uma fonte PostgreSQL. Alternativas de migração suportadas foram compartilhadas. Por favor, confirme se isso resolve sua consulta ou nos informe se você precisar de mais assistência.

    Esta resposta foi útil?

    0 comentários Sem comentários

Sua resposta

As respostas podem ser marcadas como ‘Aceitas’ pelo autor da pergunta e ‘Recomendadas’ pelos moderadores, o que ajuda os usuários a saber a resposta que resolveu o problema do autor.