Re: partition routing layering in nodeModifyTable.c - Mailing list pgsql-hackers

From Amit Langote
Subject Re: partition routing layering in nodeModifyTable.c
Date
Msg-id CA+HiwqHpmMjenQqNpMHrhg3DRhqqQfby2RCT1HWVwMin3_5vMA@mail.gmail.com
Whole thread Raw
In response to Re: partition routing layering in nodeModifyTable.c  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: partition routing layering in nodeModifyTable.c
List pgsql-hackers
On Tue, Oct 27, 2020 at 10:23 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> This patch looks reasonable to me at a quick glance. I'm a bit worried
> or unhappy about the impact on FDWs, though. It doesn't seem nice that
> the ResultRelInfo is not available in the BeginDirectModify call. It's
> not too bad, the FDW can call ExecGetResultRelation() if it needs it,
> but still. Perhaps it would be better to delay calling
> BeginDirectModify() until the first modification is performed, to avoid
> any initialization overhead there, like establishing the connection in
> postgres_fdw.

Ah, calling BeginDirectModify() itself lazily sounds like a good idea;
see attached updated 0001 to see how that looks.  While updating that
patch, I realized that the ForeignScan.resultRelation that we
introduced in 178f2d560d will now be totally useless. :-(

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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [patch] Fix checksum verification in base backups for zero page headers
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Custom compression methods