Re: generated columns bug, see inconsistent data - Mailing list pgsql-bugs

From Tom Lane
Subject Re: generated columns bug, see inconsistent data
Date
Msg-id 144386.1666748100@sss.pgh.pa.us
Whole thread Raw
In response to generated columns bug, see inconsistent data  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-bugs
Jeff Janes <jeff.janes@gmail.com> writes:
> I can reproduce the issue in all recent versions (didn't check before 12),
> including 15.0 and 16dev.  You can see rows in which the generated column
> has a value inconsistent with the columns it is generated from.

My first guess about this is that we're failing to recalculate generated
columns in the EPQ code path where an update is re-applied to a
just-modified row.  Can you tell whether the inconsistencies are
associated with rows that get updated twice in quick succession (by
different sessions)?  Does the problem go away under serializable mode?

> If I copy the core expression of the immutable function into the generated
> column expression, leaving the function just for the monitoring query, then
> I never see the inconsistency.

Maybe that changes the timing?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Jeff Janes
Date:
Subject: generated columns bug, see inconsistent data
Next
From: PG Bug reporting form
Date:
Subject: BUG #17663: Connect to the database through jdbc, call the stored procedure containing the rollback statement,