> Since the "Parallel SELECT for INSERT" patch and related GUC/reloption patch > have been committed, I have now rebased and attached the rest of the original > patchset, > which includes: >- Additional tests for "Parallel SELECT for INSERT" >- Parallel INSERT functionality >- Test and documentation updates for Parallel INSERT Hi,
I noticed that some comments may need updated since we introduced parallel insert in this patch. 1) src/backend/executor/execMain.c * Don't allow writes in parallel mode. Supporting UPDATE and DELETE * would require (a) storing the combocid hash in shared memory, rather * than synchronizing it just once at the start of parallelism, and (b) an * alternative to heap_update()'s reliance on xmax for mutual exclusion. * INSERT may have no such troubles, but we forbid it to simplify the * checks. As we will allow INSERT in parallel mode, we'd better change the comment here. 2) src/backend/storage/lmgr/README dangers are modest. The leader and worker share the same transaction, snapshot, and combo CID hash, and neither can perform any DDL or, indeed, write any data at all. Thus, for either to read a table locked exclusively by The same as 1), parallel insert is the exception. 3) src/backend/storage/lmgr/README mutual exclusion method for such cases. Currently, the parallel mode is strictly read-only, but now we have the infrastructure to allow parallel inserts and parallel copy. May be we can say: +mutual exclusion method for such cases. Currently, we only allowed parallel +inserts, but we already have the infrastructure to allow parallel copy. Best regards, houzj