I'm trying to create a logical replication between 2 Postgres 10 databases in separate clusters. All the process seem to be working, no error and \dRs+ shows the subscription correctly. The master database is 3TB size approx. How much does it take to start seeing records in the replica database?

The replication process I followed was: Set wal_level to logical. Restart the database.

  1. Create a user and grant replication privileges.
  2. wal_keep_segments: 512
  3. Change pg_hba.conf for this replication user.
  4. Create a publication for all tables. CREATE PUBLICATION mypub FOR ALL TABLES

Then on the replica:

  1. Create a database and the tables.
  2. Create the subscription. CREATE SUBSCRIPTION mysub CONNECTION 'dbname=testdb host= user=rep password=Password port=5432' PUBLICATION mypub;
  • Replicating 3 TB of data is going to take a long time. No one can tell you how long based on the information provided. – jjanes Jan 4 at 14:40
  • What information should i add in order to clarify more the case? @jjanes – Imanol Y. Jan 4 at 14:54
  • Network and disk speed could both be important, whichever ends up being the bottleneck between the two. If both are very fast, then the CPU usage of the underlying COPY command would be limiting. You probably can't do much better than 1GB/minute even under the best conditions. – jjanes Jan 4 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.