HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Replicate only a few tables in PostgreSQL 10

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
replicatepostgresqltablesfewonly

Problem

I have a need to keep updated just a few tables between databases with different purposes and schemas, except for these few tables.

My current solution is a cron job that selects from one database and inserts into the other every minute or so, but I was wondering if there are more robust solutions around for PostgreSQL version 10.

Solution

To replicate some specific tables, you can use logical replication

Another option is to not replicate at all and access the remote tables through a foreign table

Context

StackExchange Database Administrators Q#212818, answer score: 12

Revisions (0)

No revisions yet.