postgresql/contrib/postgres_fdw
Michael Paquier bf491a9073 Disable WAL-skipping optimization for COPY on views and foreign tables
COPY can skip writing WAL when loading data on a table which has been
created in the same transaction as the one loading the data, however
this cannot work on views or foreign table as this would result in
trying to flush relation files which do not exist.  So disable the
optimization so as commands are able to work the same way with any
configuration of wal_level.

Tests are added to cover the different cases, which need to have
wal_level set to minimal to allow the problem to show up, and that is
not the default configuration.

Reported-by: Luis M. Carril, Etsuro Fujita
Author: Amit Langote, Michael Paquier
Reviewed-by: Etsuro Fujita
Discussion: https://postgr.es/m/15552-c64aa14c5c22f63c@postgresql.org
Backpatch-through: 10, where support for COPY on views has been added,
while v11 has added support for COPY on foreign tables.
2018-12-23 16:42:22 +09:00
..
expected Disable WAL-skipping optimization for COPY on views and foreign tables 2018-12-23 16:42:22 +09:00
sql Disable WAL-skipping optimization for COPY on views and foreign tables 2018-12-23 16:42:22 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
connection.c Add WL_EXIT_ON_PM_DEATH pseudo-event. 2018-11-23 20:46:34 +13:00
deparse.c Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
option.c Improve style guideline compliance of assorted error-report messages. 2018-03-22 17:33:10 -04:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Repair bogus EPQ plans generated for postgres_fdw foreign joins. 2018-12-12 16:08:30 -05:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Fix WITH CHECK OPTION on views referencing postgres_fdw tables. 2018-07-08 16:53:36 -07:00
shippable.c Create a separate oid range for oids assigned by genbki.pl. 2018-12-13 14:50:57 -08:00