From 4af39300051baa269609506fc1a66b79f486a0dd Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Thu, 10 Oct 2024 11:35:58 +0800 Subject: [PATCH 1/2] no more all tables --- connect/postgres/rds_postgres.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connect/postgres/rds_postgres.mdx b/connect/postgres/rds_postgres.mdx index 37d18cf..a062c87 100644 --- a/connect/postgres/rds_postgres.mdx +++ b/connect/postgres/rds_postgres.mdx @@ -68,9 +68,10 @@ Connect to your RDS postgres through the admin user and run the below commands: ``` 4. Create publication that you'll be using for creating the MIRROR (replication) in future. +It's recommended to create a publication for only the tables that you want to replicate, like below: 1. ```sql - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; ``` From 0b443bba2cd213dd5d1ee4b12672ea1eae523224 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Thu, 10 Oct 2024 12:31:25 +0800 Subject: [PATCH 2/2] no more for all tables --- connect/postgres/azure_flexible_server_postgres.mdx | 4 ++-- connect/postgres/cloudsql_postgres.mdx | 4 ++-- connect/postgres/crunchy_bridge.mdx | 4 ++-- connect/postgres/neon_postgres.mdx | 5 +++-- connect/postgres/rds_postgres.mdx | 2 +- connect/postgres/supabase_postgres.mdx | 5 +++-- connect/postgres/supabase_postgres_peerdb_cloud.mdx | 5 +++-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/connect/postgres/azure_flexible_server_postgres.mdx b/connect/postgres/azure_flexible_server_postgres.mdx index 0b96ad2..799cfdd 100644 --- a/connect/postgres/azure_flexible_server_postgres.mdx +++ b/connect/postgres/azure_flexible_server_postgres.mdx @@ -65,10 +65,10 @@ Connect to your Azure Flexible Server Postgrees through the admin user and run t ALTER ROLE peerdb_user REPLICATION; ``` -4. Create publication that you'll be using for creating the MIRROR (replication) in future. +4. Create a publication that you'll be using for creating the MIRROR (replication) in future. 1. ```sql - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; ``` 5. Set `wal_sender_timeout` to 0 for `peerdb_user` diff --git a/connect/postgres/cloudsql_postgres.mdx b/connect/postgres/cloudsql_postgres.mdx index aae9497..e92867c 100644 --- a/connect/postgres/cloudsql_postgres.mdx +++ b/connect/postgres/cloudsql_postgres.mdx @@ -84,10 +84,10 @@ Connect to your CloudSQL Postgres through the admin user and run the below comma ALTER ROLE peerdb_user REPLICATION; ``` -4. Create publication that you'll be using for creating the MIRROR (replication) in future. +4. Create a publication that you'll be using for creating the MIRROR (replication) in future. 1. ```sql - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; ``` diff --git a/connect/postgres/crunchy_bridge.mdx b/connect/postgres/crunchy_bridge.mdx index b458d40..119586c 100644 --- a/connect/postgres/crunchy_bridge.mdx +++ b/connect/postgres/crunchy_bridge.mdx @@ -36,10 +36,10 @@ Connect to your Crunchy Bridge Postgres through the `postgres` user and run the ALTER ROLE peerdb_user REPLICATION; ``` -4. Create publication that you'll be using for creating the MIRROR (replication) in future. +4. Create a publication that you'll be using for creating the MIRROR (replication) in future. 1. ```sql - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; ``` diff --git a/connect/postgres/neon_postgres.mdx b/connect/postgres/neon_postgres.mdx index a91f48d..53fca17 100644 --- a/connect/postgres/neon_postgres.mdx +++ b/connect/postgres/neon_postgres.mdx @@ -21,8 +21,9 @@ Here, we can run the following SQL commands: -- Give replication permission to the USER ALTER USER peerdb_user REPLICATION; --- Create a publication. We will use this when creating the mirror - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; +-- Create a publication with the tables you wish to replicate. We will use this when creating the mirror + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; + ``` diff --git a/connect/postgres/rds_postgres.mdx b/connect/postgres/rds_postgres.mdx index a062c87..5ef0b0a 100644 --- a/connect/postgres/rds_postgres.mdx +++ b/connect/postgres/rds_postgres.mdx @@ -67,7 +67,7 @@ Connect to your RDS postgres through the admin user and run the below commands: GRANT rds_replication TO peerdb_user ; ``` -4. Create publication that you'll be using for creating the MIRROR (replication) in future. +4. Create a publication that you'll be using for creating the MIRROR (replication) in future. It's recommended to create a publication for only the tables that you want to replicate, like below: 1. ```sql diff --git a/connect/postgres/supabase_postgres.mdx b/connect/postgres/supabase_postgres.mdx index 4575589..d5c0a4a 100644 --- a/connect/postgres/supabase_postgres.mdx +++ b/connect/postgres/supabase_postgres.mdx @@ -25,8 +25,9 @@ Here, we can run the following SQL commands: -- Give replication permission to the USER ALTER USER peerdb_user REPLICATION; --- Create a publication. We will use this when creating the mirror - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; +-- Create a publication with the tables you wish to replicate. We will use this when creating the mirror + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; + ``` diff --git a/connect/postgres/supabase_postgres_peerdb_cloud.mdx b/connect/postgres/supabase_postgres_peerdb_cloud.mdx index 681e293..5e7b485 100644 --- a/connect/postgres/supabase_postgres_peerdb_cloud.mdx +++ b/connect/postgres/supabase_postgres_peerdb_cloud.mdx @@ -23,8 +23,9 @@ Here, we can run the following SQL commands: -- Give replication permission to the USER ALTER USER peerdb_user REPLICATION; --- Create a publication. We will use this when creating the mirror - CREATE PUBLICATION peerdb_publication FOR ALL TABLES; +-- Create a publication with the tables you wish to replicate. We will use this when creating the mirror + CREATE PUBLICATION peerdb_publication FOR TABLE table1, table2, table3....; + ```