Re: de-deduplicate code in DML execution hooks in postgres_fdw - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: de-deduplicate code in DML execution hooks in postgres_fdw
Date
Msg-id 20180720044935.GE7023@paquier.xyz
Whole thread Raw
In response to Re: de-deduplicate code in DML execution hooks in postgres_fdw  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: de-deduplicate code in DML execution hooks in postgres_fdw  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
On Thu, Jul 19, 2018 at 05:35:11PM +0900, Etsuro Fujita wrote:
> +1 for the general idea.  (Actually, I also thought the same thing before.)
> But since this is definitely a matter of PG12, ISTM that it's wise to work
> on this after addressing the issue in [1].  My concern is: if we do this
> refactoring now, we might need two patches for fixing the issue in case of
> backpatching as the fix might need to change those executor functions.

FWIW, I would think that if some cleanup of the code is obvious, we
should make it without waiting for the other issues to settle down
because there is no way to know when those are done, and this patch
could be forgotten.  This indeed makes back-patching a bit harder but it
also reduces the code chunk for HEAD with the extra fixes.

Looking at the proposed patch, moving the new routine closer to
execute_dml_stmt and renaming it execute_dml_single_row would be nicer.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
Next
From: David Fetter
Date:
Subject: Re: Make foo=null a warning by default.