Re: Attach to shared memory after fork()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Attach to shared memory after fork()
Дата
Msg-id 2616865.1619531485@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Attach to shared memory after fork()  ("邱宇航(烛远)" <yuhang.qyh@alibaba-inc.com>)
Список pgsql-hackers
"=?UTF-8?B?6YKx5a6H6IiqKOeDm+i/nCk=?=" <yuhang.qyh@alibaba-inc.com> writes:
> Fork is an expensive operation[1].

Yeah, it's not hugely cheap.

> So I propose to remove shared buffers from postmaster and shmat them
> after fork.

This proposal seems moderately insane.  In the first place, it
introduces failure modes we could do without, and in the second place,
how is it not strictly *more* expensive than what happens now?  You
still have to end up with all those TLB entries mapped in the child.

(If your kernel is unable to pass down shared-memory TLBs effectively,
ISTM that's a kernel shortcoming not a Postgres architectural problem.)

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Performance degradation of REFRESH MATERIALIZED VIEW
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Performance degradation of REFRESH MATERIALIZED VIEW