Re: Initial Schema Sync for Logical Replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Initial Schema Sync for Logical Replication
Date
Msg-id CAA4eK1LYqZQWdGo+i1qUvyrz0FMcrgTQn6PMhLg7pSVhqW71sQ@mail.gmail.com
Whole thread Raw
In response to RE: Initial Schema Sync for Logical Replication  ("Kumar, Sachin" <ssetiya@amazon.com>)
Responses RE: Initial Schema Sync for Logical Replication
List pgsql-hackers
On Thu, Mar 16, 2023 at 10:27 PM Kumar, Sachin <ssetiya@amazon.com> wrote:
>
> > Hi,
> >
> > I have a couple of questions.
> >
> > Q1.
> >
> > What happens if the subscriber already has some tables present? For
> > example, I did not see the post saying anything like "Only if the table does
> > not already exist then it will be created".
> >
> My assumption was the if subscriber is doing initial schema sync , It does not have
> any conflicting database objects.
>

Can't we simply error out in such a case with "obj already exists"?
This would be similar to how we deal with conflicting rows with
unique/primary keys.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Allow logical replication to copy tables in binary format
Next
From: Michael Paquier
Date:
Subject: Re: Improve logging when using Huge Pages