Re: Shared memory changes in 9.4?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Shared memory changes in 9.4?
Date: 2014-05-26 07:24:47
Message-ID: 20140526072447.GL18867@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

On 2014-05-25 12:26:20 -0700, Maciek Sakrejda wrote:
> I've been trying to take the 9.4 beta for a spin, but seem to have run into
> a shared memory issue on startup:
>
> FATAL: could not open shared memory segment "/PostgreSQL.1804289383":
> Permission denied
>
> We're running Postgres inside LXC, which I suspect is causing problems
> here, but 9.0 through 9.3 run just fine in the same configuration.

Any chance you're using a 9.3 configuration file instead of the one
generated by initdb?
dynamic_shared_memory_type defaults to 'posix' if not specified in the
config file (on platforms supporting it). If initdb detects that 'posix'
can't be used it'll emit a different value. If you're copying the config
from 9.3 and your environment doesn't support posix shm that'll cause
the above error.
I still think dynamic_shared_memory_type should default to 'none'
because of such problems.

> Any idea
> what may have changed? I suspect the solution here is tweaking some LXC
> setting, but I was hoping someone can point me in the right direction.

It sounds like you're not allowing posix shared memory. Possibly just by
not mounting /dev/shm.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2014-05-26 07:41:46 Re: postgreSQL : duplicate DB names
Previous Message Khangelani Gama 2014-05-26 07:20:11 postgreSQL : duplicate DB names

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Samonenko 2014-05-26 08:04:09 libpq: PQexec may block indefinitly
Previous Message Andres Freund 2014-05-26 05:24:07 Re: Sending out a request for more buildfarm animals?