Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

From: James Coleman <jtc331(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING
Date: 2024-02-08 13:53:10
Message-ID: CAAaqYe91iO3dfUnVmBs4M-4aUX_zHmPN72ELE7c_8qAO_toPmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 7, 2024 at 11:27 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote:
> > - how to set the replica identity. If a table without a replica identity is
> > + how to set the replica identity. If a table without a replica identity
> > + (or with replica identity behavior the same as <literal>NOTHING</literal>) is
> > added to a publication that replicates <command>UPDATE</command>
> > or <command>DELETE</command> operations then
> > subsequent <command>UPDATE</command> or <command>DELETE</command>
>
> I had the impression that the root of the confusion was the perceived difference
> between "REPLICA IDENTITY NOTHING" and "no replica identity", and that change
> doesn't improve that.
>
> How about:
>
> If a table without a replica identity (explicitly set to <literal>NOTHING</literal>,
> or set to a primary key or index that doesn't exist) is added ...

I think that would work also. I was reading the initial suggestion as
"(or with replica identity behavior the same as..." as defining what
"without a replica identity" meant, which would avoid the confusion.
But your proposal is more explicit and more succinct, so I think it's
the better option of the two.

Regards,
James Coleman

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2024-02-08 13:54:32 Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING
Previous Message wenhui qiu 2024-02-08 13:27:36 Re: Thoughts about NUM_BUFFER_PARTITIONS