RE: POC: postgres_fdw insert batching - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: POC: postgres_fdw insert batching
Date
Msg-id TYAPR01MB2990E3D10A122358419482B2FEBD0@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: POC: postgres_fdw insert batching  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: POC: postgres_fdw insert batching  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
From: Amit Langote <amitlangote09@gmail.com>
> Yes, it can be simplified by using a local join to prevent the update of the foreign
> partition from being pushed to the remote server, for which my example in the
> previous email used a local trigger.  Note that the update of the foreign
> partition to be done locally is a prerequisite for this bug to occur.

Thank you, I was aware that UPDATE calls ExecInsert() but forgot about it partway.  Good catch (and my bad miss.)


+    PgFdwModifyState *fmstate = resultRelInfo->ri_FdwState ?
+                            (PgFdwModifyState *) resultRelInfo->ri_FdwState :
+                            NULL;

This can be written as:

+    PgFdwModifyState *fmstate = (PgFdwModifyState *) resultRelInfo->ri_FdwState;


Regards
Takayuki Tsunakawa


pgsql-hackers by date:

Previous
From: Masahiro Ikeda
Date:
Subject: Re: About to add WAL write/fsync statistics to pg_stat_wal view
Next
From: Masahiro Ikeda
Date:
Subject: Re: About to add WAL write/fsync statistics to pg_stat_wal view