February 2020
Intermediate to advanced
734 pages
38h 13m
English
There is a much easier way to do this that may apply if all tables have primary keys. pglogical has a function specifically for this case that greatly simplifies the preceding procedure, especially if we want every table to be part of the migration. We could have obtained our list of schemas and then executed the following function:
SELECT pglogical.replication_set_add_all_tables( set_name := 'default', schema_names := array_agg(nspname) ) FROM schema_list;
This would automatically register every table in each schema with pglogical for the default replication set. We hope your upgrade qualifies for using this function, but even if it doesn't, the procedure detailed in this recipe should work.
Read now
Unlock full access