From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Conflict detection for update_deleted in logical replication |
Date: | 2025-01-16 10:14:56 |
Message-ID: | CAFiTN-t4hq3jG4jGH4bwRW-Z233_UrWmWS43EpNt8ajPKxeq=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 3, 2025 at 4:31 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Thu, Jan 2, 2025 at 2:57 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Conflict detection of truncated updates is detected as update_missing
> > and deleted update is detected as update_deleted. I was not sure if
> > truncated updates should also be detected as update_deleted, as the
> > document says truncate operation is "It has the same effect as an
> > unqualified DELETE on each table" at [1].
> >
>
> This is expected behavior because TRUNCATE would immediately reclaim
> space and remove all the data. So, there is no way to retain the
> removed row.
>
I’m not sure whether to call this expected behavior or simply acknowledge
that we have no way to control it. Logically, it would have been preferable
if it behaved like a DELETE, but we are constrained by the way TRUNCATE
works. At least that's what my opinion about this case.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2025-01-16 10:23:46 | Re: Fix misuse use of pg_b64_encode function (contrib/postgres_fdw/connection.c) |
Previous Message | Amit Kapila | 2025-01-16 10:01:55 | Re: Conflict detection for update_deleted in logical replication |