Search code examples
postgresqlreplication

Does postgresql logical replication use encryption?


Does postgresql logical replication use encryption? I am referring to native not pglogical. I can't find any documentation on how this works if I want to replicate over the internet.

Thanks!

I have setup replication using CREATE PUBLICATION and CREATE SUBSCRIPTION as described here: https://www.postgresql.org/docs/current/logical-replication.html But it has no information on encryption.


Solution

  • It is no different than any other connection, just specify the parameters you want. For example:

     create subscription sub CONNECTION 'host=example.com sslmode=verify-full' publication pub;