Re: Refactoring backend fork+exec code

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Refactoring backend fork+exec code
Дата
Msg-id 20231130203129.ukiozxjmcmxkzrsj@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Refactoring backend fork+exec code  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: Refactoring backend fork+exec code  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hi,

On 2023-11-30 12:44:33 -0600, Tristan Partin wrote:
> >  +        /*
> >  +         * Set reference point for stack-depth checking.  This might seem
> >  +         * redundant in !EXEC_BACKEND builds; but it's not because the postmaster
> >  +         * launches its children from signal handlers, so we might be running on
> >  +         * an alternative stack. XXX still true?
> >  +         */
> >  +        (void) set_stack_base();
> 
> Looks like there is still this XXX left. Can't say I completely understand
> the second sentence either.

We used to start some child processes of postmaster in signal handlers. That
was fixed in

commit 7389aad6366
Author: Thomas Munro <tmunro@postgresql.org>
Date:   2023-01-12 12:34:23 +1300
 
    Use WaitEventSet API for postmaster's event loop.


In some cases signal handlers run on a separate stack, which meant that the
set_stack_base() we did in postmaster would yield a completely bogus stack
depth estimation.  So this comment should likely have been removed. Thomas?

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Refactoring backend fork+exec code
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: GUC names in messages