Based on the official doc,
CREATE PUBLICATION command is available on PostgreSQL 10 and later. However, I have a requirement to replicate PostgreSQL 9.5 to BigQuery using datastream, which require us to create a publication and a replication slot.
My question, can I create a pglogical node and replication set to achieve the same result as
CREATE PUBLICATION command?
Command using pglogical:
SELECT pglogical.create_node( node_name := 'provider1', dsn := 'host=server_host port=5432 dbname=db_name' ); SELECT pglogical.replication_set_add_all_tables('default', ARRAY['public']);
Command using publication:
CREATE PUBLICATION db_publication FOR ALL TABLES;
After above command, we need to create the replication slot with the following command:
SELECT PG_CREATE_LOGICAL_REPLICATION_SLOT('slot_name', 'pgoutput');
which seems are available on PostgreSQL 9.5.
If it's not possible to only use pglogical command, is there any alternative to replicate the DB to BigQuery? Thanks