Re: on_exit_reset fails to clear DSM-related exit actions
От | Alvaro Herrera |
---|---|
Тема | Re: on_exit_reset fails to clear DSM-related exit actions |
Дата | |
Msg-id | 20140310201803.GM4759@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: on_exit_reset fails to clear DSM-related exit actions (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Robert Haas escribió: > A related point that's been bugging me for a while, and has just > struck me again, is that background workers for which > BGWORKER_SHMEM_ACCESS is not passed probably ought to be detaching > shared memory (and DSMs). Currently, and since Alvaro originally > added the facility, the death of a non-BGWORKER_SHMEM_ACCESS backend > is used in postmaster.c to decide whether to call HandleChildCrash(). > But such workers could still clobber shared memory arbitrarily; they > haven't unmapped it. Oddly, the code in postmaster.c is only cares > about the flag when checking EXIT_STATUS_0()/EXIT_STATUS_1(), not when > checking ReleasePostmasterChildSlot()... Clearly there's not a lot of consistency on that. I don't think I had made up my mind completely about such details. I do remember that unmapping/detaching the shared memory segment didn't cross my mind; the flag, as I recall, only controls (controlled) whether to attach to it explicitely. IOW feel free to whack around. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: