RE: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>

From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>, vignesh C <vignesh21@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2024-11-19T09:12:29Z
Lists: pgsql-hackers
On Tuesday, November 19, 2024 5:10 PM Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> wrote:
> 
> On Tuesday, November 19, 2024 3:15 PM Shlok Kyal
> <shlok.kyal.oss@gmail.com> wrote:
> 
> >
> > I noticed that we can add 'publish_generated_columns = true' for the case of
> > generated column. So we won't need to remove the test. I have made the
> > changes in v9 patch [1].
> 
> I think this would unexpectedly change the original purpose of that testcase,
> which is to test the bug mentioned in commit b797def.
> 
> Basically, I expected the new testcase to fail if we remove the codes fix added in
> b797def, but the new testcase can pass even after that.

Sorry, a typo here. I meant the commit adedf54 instead of b797def.

> 
> If we confirmed that that bug will never be triggered after applying the fix in
> the thread, it would be better Tt remove that testcase and mention it in the
> commit message.

Best Regards,
Hou zj

Commits

  1. Improve the error message introduced in commit 87ce27de696.

  2. Ensure stored generated columns must be published when required.

  3. Replicate generated columns when 'publish_generated_columns' is set.

  4. Ignore generated columns during apply of update/delete.

  5. Ignore dropped columns during apply of update/delete.