mercredi 25 mars 2015

How to sync postgres roles between multiple servers


I am looking for a solution in which I can replicate the details of a role (most notably the password) between various postgres servers. (All running the same version).


The idea behind this is that we have some manual form of sharding in place, in which we plan to handle the movement of databases manually at the moment. To easy this process it would be ideal if we don't have to bother if an account is present on the target server, but just simply move the database from server a to server b.


As we have over a 1000 databases (with each his own role connected) some automation in user roles would be welcome.


I guess that the accounts are stored in the users table (of pg_database) but I don't feel comfortable writing any code for synchronisation myself as I don't want the possible future trouble of version compatibility.





Aucun commentaire:

Enregistrer un commentaire