Commit c6a01d9
committed
Copy the INSERT query in postgres_fdw
When executing the INSERT with batching, we may need to rebuild the
query when the batch size changes, in which case we pfree the current
string. We must not release the original string, stored in fdw_private,
because that may be needed in EXPLAIN ANALYZE. So make copy of the SQL,
but only for INSERT queries.
Reported-by: Pavel Stehule
Discussion: https://postgr.es/m/CAFj8pRCL_Rjw-MCR6J7VX9OF7MR6PA5K8qUbrMvprW_e-aHkfQ%40mail.gmail.com1 parent 8292c06 commit c6a01d9
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3903 | 3903 | | |
3904 | 3904 | | |
3905 | 3905 | | |
| 3906 | + | |
| 3907 | + | |
3906 | 3908 | | |
| 3909 | + | |
3907 | 3910 | | |
3908 | 3911 | | |
3909 | 3912 | | |
| |||
0 commit comments