On Tue, Nov 10, 2020 at 10:17:15AM +0000, Paul Guo wrote: > Raw insert could be used on CTAS & Create MatView. For Refresh MatView the > code is a bit > different. I did not spend more time on this so not sure raw insert could be > used for that. > > But I think the previous multi insert work could be still used in at least > "INSERT tbl SELECT…” (if the INSERT > is a simple one, e.g. no trigger, no index, etc).
Note that I've started that idea on another thread: https://commitfest.postgresql.org/30/2553/ - should INSERT SELECT use a BulkInsertState? (and multi_insert) There's also this one: https://commitfest.postgresql.org/30/2818/ - split copy.c, Heikki -- Justin