From: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Copy the INSERT query in postgres_fdw |
Date: | 2021-05-07 20:38:20 |
Message-ID: | E1lf7Eq-0005UT-2v@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c6a01d924939306e95c8deafd09352be6a955648
Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 3 +++
1 file changed, 3 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-05-08 01:27:35 | pgsql: Fix incorrect error code for CREATE/ALTER TABLE COMPRESSION |
Previous Message | Andrew Dunstan | 2021-05-07 18:31:00 | pgsql: Add a README and Makefile recipe for Gen_dummy_probes.pl |