flags argument for dsm_create

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: flags argument for dsm_create
Date: 2015-03-19 15:21:45
Message-ID: CA+TgmoZZQsK6yQVPj2tBnqho7k4yWkeR8rAMMM13yc+2CPq4tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Discussion on the parallel sequential scan thread has revealed the
need for a way to make dsm_create() return NULL, instead of failing,
when we hit the system-wide maximum on the number of dynamic shared
memory segments than can be created. I've developed a small patch for
this which I attach here. It adds a second argument to dsm_create(),
an integer flags argument. I would like to go ahead and commit this
more or less immediately if there are not objections.

One question I struggled with is whether to keep the existing
dsm_create() signature intact and add a new function
dsm_create_extended(). I eventually decided against it. The
dsm_create() API is relatively new at this point, so there probably
aren't too many people who will be inconvenienced by an API break now.
If we go ahead and create dsm_create_extended() now, and then need
to make another API change down the line, I doubt there will be much
support for dsm_create_extended2() or whatever. So my gut is that
it's better to just change this outright, and keep
dsm_create_extended() as an idea for the future. But I could go the
other way on that if people feel strongly about it.

Thanks,

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
dsm-create-flags.patch binary/octet-stream 3.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-03-19 15:23:59 Re: assessing parallel-safety
Previous Message Robert Haas 2015-03-19 15:12:11 Re: Parallel Seq Scan