Re: Handle infinite recursion in logical replication setup - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Handle infinite recursion in logical replication setup
Date
Msg-id CAFiTN-t9P+4RG9MOh8_V+QBdrbifRRBoxQ7TAgn5xd==eLT=5A@mail.gmail.com
Whole thread Raw
In response to RE: Handle infinite recursion in logical replication setup  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Responses Re: Handle infinite recursion in logical replication setup
List pgsql-hackers
On Mon, Aug 22, 2022 at 9:19 AM houzj.fnst@fujitsu.com
<houzj.fnst@fujitsu.com> wrote:
>
> > Jonathan, Sawada-San, Hou-San, and others, what do you think is the best way
> > to move forward here?
>
> I think it's fine to throw a WARNING in this case given that there is a
> chance of inconsistent data.

IMHO, since the user has specifically asked for origin=NONE but we do
not have any way to detect the origin during initial sync so I think
this could be documented and we can also issue the WARNING.  So that
users notice that part and carefully set up the replication.  OTOH, I
do not think that giving an error is very inconvenient because we are
already providing a new option "origin=NONE" so along with that lets
force the user to choose between copy_data=off or copy_data=force and
with that, there is no scope for mistakes.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Next
From: David Rowley
Date:
Subject: Small cleanups to tuplesort.c and a bonus small performance improvement