postgresql/src/backend
David Rowley 56b3b38382 Fix incorrect index behavior in COPY FROM with partitioned tables
86b85044e rewrote how COPY FROM works to allow multiple tuple buffers to
exist to once thus allowing multi-inserts to be used in more cases with
partitioned tables.  That commit neglected to update the estate's
es_result_relation_info when flushing the insert buffer to the partition
making it possible for the index tuples to be added into an index on the
wrong partition.

Fix this and also add an Assert in ExecInsertIndexTuples to help ensure
that we never make this mistake again.

Reported-by: Haruka Takatsuka
Author: Ashutosh Sharma
Discussion: https://postgr.es/m/15832-b1bf336a4ee246b5@postgresql.org
2019-06-05 18:28:38 +12:00
..
access Fix typos in various places 2019-06-03 13:44:03 +09:00
bootstrap In bootstrap mode, use default signal handling for SIGINT etc. 2019-05-14 10:22:28 -04:00
catalog Add command column to pg_stat_progress_create_index 2019-06-04 09:29:02 +02:00
commands Fix incorrect index behavior in COPY FROM with partitioned tables 2019-06-05 18:28:38 +12:00
executor Fix incorrect index behavior in COPY FROM with partitioned tables 2019-06-05 18:28:38 +12:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Fix typos in various places 2019-06-03 13:44:03 +09:00
lib Update copyright year. 2019-05-24 12:03:32 +12:00
libpq Fix typos. 2019-05-26 18:28:18 +05:30
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
optimizer Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
parser Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
partitioning Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
po Translation updates 2019-05-20 16:00:53 +02:00
port Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
postmaster Fix typos. 2019-05-26 18:28:18 +05:30
regex Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
replication Fix typos. 2019-05-24 12:00:59 +12:00
rewrite Fix typos in various places 2019-06-03 13:44:03 +09:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Make error logging in extended statistics more consistent 2019-05-30 17:03:36 +02:00
storage Fix typos in various places 2019-06-03 13:44:03 +09:00
tcop Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tsearch Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
utils Fix typos in various places 2019-06-03 13:44:03 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00