Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks
Дата
Msg-id CA+TgmobSwOUTonpKUKaVLiK2XGLw4OcVn+hyffJKBNbZcJpACw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Mon, Aug 10, 2020 at 8:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It's certainly arguable that PG_ENSURE_ERROR_CLEANUP is a special
> snowflake and needs to use a separate mechanism.  What is not real clear
> to me is why there are any other callers that must use before_shmem_exit
> rather than on_shmem_exit --- IOW, except for P_E_E_C's use, I have never
> been persuaded that the former callback list should exist at all.  The
> expectation for on_shmem_exit is that callbacks correspond to system
> service modules that are initialized in a particular order, and can safely
> be torn down in the reverse order.  Why can't the existing callers just
> make even-later entries into that same callback list?

That split dates to the parallel query work, and there are some
comments in shmem_exit() about it; see in particular the explanation
in the middle where it says "Call dynamic shared memory callbacks." It
seemed to me that I needed the re-entrancy behavior that is described
there, but for a set of callbacks that needed to run before some of
the existing callbacks and after others.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Smith, Peter"
Дата:
Сообщение: RE: Libpq support to connect to standby server as priority
Следующее
От: Andy Fan
Дата:
Сообщение: Can I test Extended Query in core test framework