Re: problem with RETURNING and update row movement

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: David Steele <david@pgmasters.net>
Cc: Michael Paquier <michael@paquier.xyz>, Etsuro Fujita <etsuro.fujita@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-03-22T08:33:33Z
Lists: pgsql-hackers

Attachments

On Sat, Mar 6, 2021 at 12:52 AM David Steele <david@pgmasters.net> wrote:
> On 10/30/20 6:00 AM, Amit Langote wrote:
> > The question
> > I guess is whether that thread must conclude before the fix here can
> > be committed.
>
> Indeed. But it seems like there is a candidate patch on [1] though that
> thread has also stalled. I'll try to get some status on that thread but
> the question remains if this patch will be stalled until [1] is resolved.

Sorry for the delay in following up on this thread.  I've posted new
patches on the other.

FWIW, I think we should go ahead and apply the patches for the bug
reported here.  Anyone who tries to project an updated tuple's system
columns using RETURNING are likely to face problems one way or
another, especially if they have partitioned tables containing
partitions of varying table AMs, but at least they won't face the bug
discussed here.

I've attached patches for all affected branches.

-- 
Amit Langote
EDB: http://www.enterprisedb.com

Commits

  1. Fix bugs in RETURNING in cross-partition UPDATE cases.

  2. postgres_fdw: Clean up handling of system columns.