2017-06-28 1 views
0

Je suis en train d'utiliser le transporteur de composition pour répliquer les modifications de postgres à rabbitmq:compose - comment créer un utilisateur PostgreSQL avec des rôles de superutilisateur ou de réplication?

var source = postgres({ 
  "uri": "postgres://admin:****@****.dblayer.com:17596/compose" 
  "debug": true, 
  "tail": true, 
  "replication_slot": "slot" 
}) 
var sink = rmq = rabbitmq({ 
  "uri": "amqps://transporter:****@****.composedb.com:17597/****", 
  "routing_key": "test", 
  "key_in_field": false 
  // "delivery_mode": 1, // non-persistent (1) or persistent (2) 
  // "api_port": 15672, 
  // "ssl": false, 
  // "cacerts": ["/path/to/cert.pem"] 
}) 
t.Source(source).Save(sink) 

L'erreur:

INFO[0001] Listening for changes...                      db=compose logical_decoding_slot=slot 
ERRO[0002] error plucking from logical decoding pq: must be superuser or replication role to use replication slots  db=compose 

Comment puis-je configurer l'utilisateur Postgres avec des rôles de super-utilisateur ou de réplication? Cela semble être interdit sur composer?

ALTER USER admin WITH REPLICATION; 

Résultats dans:

ERROR: must be superuser to alter replication users 

A noter également:

Can I create a 'superuser'?

PostgreSQL allows the creation of a superuser. Being a superuser implies the ability to bypass all access permission checks within the database, so superuserdom should not be granted lightly. For security purposes, we do not allow the creation of superusers.

Source: https://help.compose.com/v2.0/docs/postgresql-faq

Répondre

0

La réponse que je reçus de soutien Compose est que les comptes ne sont pas pris en charge super-utilisateur sur PostgreSQL Compose.