How it works...
That was much easier than expected! Without any extra software to install, there's very little in the way of setup. All we need to do is create the publication and the subscription and our tables are immediately in transit.
Still, we need something to replicate, so we used pg_dump to extract the tables we want to copy. Similarly, PostgreSQL will not automatically create recipient tables on the subscriber, so we must bootstrap them as empty shells with psql by importing the tables.sql file we extracted previously.
Unlike Slony, Bucardo, or pglogical, however, we don't need to first create node records before copying tables. PostgreSQL itself is the node, and it has its own records, which it manages internally. Hence, we can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access