postgresql/src/backend
Michael Paquier 15f69279e0 Disable WAL-skipping optimization for COPY on views
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 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.

A test is added to cover this case, which needs to have wal_level set to
minimal to allow the problem to show up, and that is not the default
configuration.

Reported-by: Etsuro Fujita
Author: 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:43:56 +09:00
..
access Check for conflicting queries during replay of gistvacuumpage() 2018-12-21 02:33:48 +03:00
bootstrap Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
catalog Fix bogus logic for skipping unnecessary partcollation dependencies. 2018-12-13 15:11:24 -05:00
commands Disable WAL-skipping optimization for COPY on views 2018-12-23 16:43:56 +09:00
executor Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
libpq Don't set PAM_RHOST for Unix sockets. 2018-11-28 14:15:00 +13:00
main Install Windows crash dump handler before all else. 2017-11-12 14:31:04 -08:00
nodes Add stack depth checks to key recursive functions in backend/nodes/*.c. 2018-12-10 11:12:43 -05:00
optimizer Fix ancient thinko in mergejoin cost estimation. 2018-12-18 11:19:39 -05:00
parser Revise attribute handling code on partition creation 2018-11-08 16:22:09 -03:00
po Translation updates 2018-11-05 14:46:40 +01:00
port Pad semaphores to avoid false sharing. 2018-07-25 11:00:53 +12:00
postmaster Improve detection of child-process SIGPIPE failures. 2018-12-16 14:32:14 -05:00
regex Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
replication Fix handling of synchronous replication for stopping WAL senders 2018-11-29 09:12:45 +09:00
rewrite Fix set of NLS translation issues 2018-08-21 15:17:38 +09:00
snowball Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
statistics Fix bogus code for extracting extended-statistics data from syscache. 2018-05-02 12:22:48 -04:00
storage Handle EPIPE more sanely when we close a pipe reading from a program. 2018-11-19 17:02:25 -05:00
tcop Server-side fix for delayed NOTIFY and SIGTERM processing. 2018-10-19 21:39:21 -04:00
tsearch Make ts_locale.c's character-type functions cope with UTF-16. 2018-11-03 13:56:10 -04:00
utils Fix minor typo in dsa.c. 2018-11-29 14:15:55 +13:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
nls.mk Translation updates 2018-05-07 11:59:42 -04:00