Re: [HACKERS] Shared Memory hash tables only at startup - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Shared Memory hash tables only at startup
Date
Msg-id 28131.1493728377@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Shared Memory hash tables only at startup  (hariprasath nallasamy <hariprasathnallasamy@gmail.com>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] logical replication and PANIC during shutdowncheckpoint in publisher
Next
From: Andreas Karlsson
Date:
Subject: Re: [HACKERS] CTE inlining