Re: Shared memory changes in 9.4? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Shared memory changes in 9.4?
Date
Msg-id 20140612094112.GZ8406@alap3.anarazel.de
Whole thread Raw
In response to Re: Shared memory changes in 9.4?  (Christoph Berg <cb@df7cb.de>)
Responses Re: Shared memory changes in 9.4?  (Christoph Berg <cb@df7cb.de>)
Re: Shared memory changes in 9.4?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

On 2014-06-12 11:07:31 +0200, Christoph Berg wrote:
> Re: Robert Haas 2014-05-28 <CA+TgmoaTcAd48zW3auWzGdHi_V+QwA5HVCTabqgTq=ZLWpysEQ@mail.gmail.com>
> > On Tue, May 27, 2014 at 8:22 PM, Maciek Sakrejda <m.sakrejda@gmail.com> wrote:
> > > On Mon, May 26, 2014 at 12:24 AM, Andres Freund <andres@2ndquadrant.com>
> > > wrote:
> > >> 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

> > With regard to Andres' proposal, I'm not that keen on setting
> > dynamic_shared_memory_type='none' by default.

Note that I'm not proposing to disable the whole thing. Just that a
unset dynamic_shared_memory_type doesn't configure dsm. Initdb would
still configure it after probing.

> To me, the following should be done:
> * Make initdb determine the best shm type for this platform and write
>   it into postgresql.conf as it does now.
> * If no dynamic_shared_memory_type is found in the config, default to
>   "none".
> * Modify the three identical error messages concerned about shm
>   segments to include the shm type instead of always just saying
>   "FATAL:  could not open shared memory segment"
> * Add a HINT to the POSIX error message:
>   "HINT: This might indicate that /dev/shm is not mounted, or its
>   permissions do not allow the database user to create files there"

Sounds like a sane plan to me.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Shared memory changes in 9.4?
Next
From: Jochem van Dieten
Date:
Subject: Re: "RETURNING PRIMARY KEY" syntax extension