Re: pgsql: Harden new test case against force_parallel_mode = regress.
От | Matthias van de Meent |
---|---|
Тема | Re: pgsql: Harden new test case against force_parallel_mode = regress. |
Дата | |
Msg-id | CAEze2Wic6DM3xg6B=E1Ze1xYaxJx2-6N+x-BXYQLF19dgsvTsQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgsql: Harden new test case against force_parallel_mode = regress. (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On Fri, 3 Mar 2023 at 17:16, Robert Haas <robertmhaas@gmail.com> wrote: > > On Thu, Mar 2, 2023 at 5:47 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Harden new test case against force_parallel_mode = regress. > > > > Per buildfarm: worker processes can't see a role created in > > the current transaction. > > Now why would that happen? Surely the snapshot for each command is > passed down from leader to worker, and the worker is not free to > invent a snapshot from nothing. Probably because we nitialize which user and database to use in the backend before we load the parent process' snapshot: in ParallelWorkerMain (parallel.c, as of HEAD @ b6a0d469): /* Restore database connection. */ BackgroundWorkerInitializeConnectionByOid(fps->database_id, fps->authenticated_user_id, 0); [...] /* Crank up a transaction state appropriate to a parallel worker. */ tstatespace = shm_toc_lookup(toc, PARALLEL_KEY_TRANSACTION_STATE, false); StartParallelWorkerTransaction(tstatespace); /* Restore combo CID state. */ combocidspace = shm_toc_lookup(toc, PARALLEL_KEY_COMBO_CID, false); RestoreComboCIDState(combocidspace); -Matthias
В списке pgsql-hackers по дате отправления: