public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Kumar, Sachin <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Initial Schema Sync for Logical Replication
Date: Sat, 18 Mar 2023 13:06:38 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 2023-Mar-15, Kumar, Sachin wrote:

> 1. In  CreateSubscription()  when we create replication slot(walrcv_create_slot()), should
> use CRS_EXPORT_SNAPSHOT, So that we can use this snapshot later in the pg_dump.
> 
> 2.  Now we can call pg_dump with above snapshot from CreateSubscription.

Overall I'm not on board with the idea that logical replication would
depend on pg_dump; that seems like it could run into all sorts of
trouble (what if calling external binaries requires additional security
setup?  what about pg_hba connection requirements? what about
max_connections in tight circumstances?).

It would be much better, I think, to handle this internally in the
publisher instead: similar to how DDL sync would work, except it'd
somehow generate the CREATE statements from the existing tables instead
of waiting for DDL events to occur.  I grant that this does require
writing a bunch of new code for each object type, a lot of which would
duplicate the pg_dump logic, but it would probably be a lot more robust.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/






view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Initial Schema Sync for Logical Replication
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox