Re: BUG #15832: COPY into a partitioned table breaks its indexes
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: harukat@sraoss.co.jp, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Andres Freund <andres@anarazel.de>
Date: 2019-06-05T06:57:14Z
Lists: pgsql-bugs
On Wed, Jun 5, 2019 at 12:11 PM David Rowley <david.rowley@2ndquadrant.com> wrote: > On Tue, 4 Jun 2019 at 21:20, Ashutosh Sharma <ashu.coek88@gmail.com> > wrote: > > Attached patch fixes the issue. It basically updates > estate->es_result_relation_info with the correct resultRelInfo in > CopyMultiInsertBufferFlush(). I've also added the test-case for it. > > > > Andres, David, do you all agree with above analysis and the proposed fix > ? > > Thanks for the report Haruka and for the patch Ashutosh. > > I've pushed this after changing the tests a little to reuse the > existing table. I also added an Assert into ExecInsertIndexTuples to > ensure the slot and the ResultRelInfo belong to the same relation. > Thank you. -- With Regards, Ashutosh Sharma EnterpriseDB:*http://www.enterprisedb.com <http://www.enterprisedb.com/>*
Commits
-
Fix incorrect index behavior in COPY FROM with partitioned tables
- 56b3b3838284 12.0 landed