Re: Providing anonymous mmap as an option of sharing memory

Поиск
Список
Период
Сортировка
От Kevin Brown
Тема Re: Providing anonymous mmap as an option of sharing memory
Дата
Msg-id 20031127031751.GM6073@filer
обсуждение исходный текст
Ответ на Re: Providing anonymous mmap as an option of sharing memory  (Shridhar Daithankar <shridhar_daithankar@myrealbox.com>)
Список pgsql-hackers
Shridhar Daithankar wrote:
> There seem to be two objections to mmap.
> 
> 1. If a backend from last crashed running postmaster exists then it might 
> have file etc. open and that is in general not such a good idea
> 
> 2. For replacing stdio for data and WAL files with mmap, mmap does not 
> guarantee order of IO which defeats WAL.

[...]

> Did I miss something?

Yes:  based on everything that I've read on the subject, you can't change
the size of a shared memory segment allocated by mmap().  It's unlikely
that mremap() will propgate changes to all other processes that share the
same area, since it can (if passed the proper flags) return a starting
address that differs from the current starting address.

And since propagation of the shared memory area is done via duplication
of the parent's page tables by the kernel at fork() time, new segments
would not be picked up by existing backends -- only new ones -- and then
only if the postmaster is the process that allocates them.


-- 
Kevin Brown                          kevin@sysexperts.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore and create FK without verification check
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore and create FK without verification check