On Tue, Jan 14, 2020 at 4:17 PM Mahendra Singh Thalor <mahi6...@gmail.com> wrote: > > Hi, > > + /* > + * Try to initialize the parallel vacuum if requested > + */ > + if (params->nworkers >= 0 && vacrelstats->useindex) > + { > + /* > + * Since parallel workers cannot access data in temporary tables, we > + * can't perform parallel vacuum on them. > + */ > + if (RelationUsesLocalBuffers(onerel)) > + { > + /* > + * Give warning only if the user explicitly tries to perform a > + * parallel vacuum on the temporary table. > + */ > + if (params->nworkers > 0) > + ereport(WARNING, > + (errmsg("disabling parallel option of vacuum > on \"%s\" --- cannot vacuum temporary tables in parallel", > > From v45 patch, we moved warning of temporary table into > "params->nworkers >= 0 && vacrelstats->useindex)" check so if table > don't have any index, then we are not giving any warning. I think, we > should give warning for all the temporary tables if parallel degree is > given. (Till v44 patch, we were giving warning for all the temporary > tables(having index and without index)) >
I am not sure how useful it is to give WARNING in this case as we are anyway not going to perform a parallel vacuum because it doesn't have an index? One can also say that WARNING is expected in the cases where we skip a parallel vacuum due to any reason (ex., if the size of the index is small), but I don't think that will be a good idea. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com