Re: [HACKERS] Shared Memory hash tables only at startup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Shared Memory hash tables only at startup
Дата
Msg-id 28131.1493728377@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Shared Memory hash tables only at startup  (hariprasath nallasamy <hariprasathnallasamy@gmail.com>)
Список pgsql-hackers
hariprasath nallasamy <hariprasathnallasamy@gmail.com> writes:
> *(In practice, all creations are done in the postmasterprocess; child
> processes should always be attaching to existing tables.)*

Yeah ...

> Is there any specific reason to do so or my understanding was wrong(we can
> create shared memory hash table at run time too?)

Well, if you don't mind resolving the race conditions that you're going to
have, you could possibly do that.  In practice though, unless it's a very
small hash table, it's going to need to be accounted for in the sizing
calculations in CreateSharedMemoryAndSemaphores, which means you might
as well create it during that function too.
        regards, tom lane



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] logical replication and PANIC during shutdowncheckpoint in publisher
Следующее
От: Andreas Karlsson
Дата:
Сообщение: Re: [HACKERS] CTE inlining