Re: Regarding Postgres Dynamic Shared Memory (DSA)

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Mahi Gurram <teckymahi(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regarding Postgres Dynamic Shared Memory (DSA)
Date: 2017-05-23 12:00:05
Message-ID: CAB7nPqS6MpeM1ibLF8T=06i6eHQoUKH2-Kg9+1krkKa6D=zkiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 23, 2017 at 6:42 AM, Mahi Gurram <teckymahi(at)gmail(dot)com> wrote:
> I'm building In-Memory index extension for Postgres, for which i'm trying to
> use DSA. But ended with some issues, as it is not allowing me to create
> DSA(Dynamic Shared Area) in _PG_init function.
>
> Please refer my_PG_init code below:
>>
>> void
>> _PG_init(void)
>> {
>> area = dsa_create(LWLockNewTrancheId(), "CustomIndex_DSA");
>> area_handle = dsa_get_handle(area);
>> }
>
>
> Because of this code, Postgres is not starting. Not even giving any error
> messages in pg logs. Hence, i'm totally clue less :(

It seems to me that you are creating those too early. For example, for
a background worker process, DSA segments would likely be created in
the main process routine. Without understanding what you are trying to
achieve, it is hard to make a good answer. You could always use a
ramdisk, but that would be likely be a waste of memory as Postgres has
its own buffer pool, killing the performance gains of OS caching.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rafia Sabih 2017-05-23 12:06:33 Re: Increasing parallel workers at runtime
Previous Message Michael Paquier 2017-05-23 11:18:47 Re: Error-like LOG when connecting with SSL for password authentication