From: Dmitry Vasilyev <d.vasilyev@postgrespro.ru>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”
Date: Thu, 15 Oct 2015 18:05:11 +0300
Message-ID: <1444921511.3661.13.camel@postgrespro.ru> (raw)
In-Reply-To: <1444920387.3661.7.camel@postgrespro.ru>
References: <1444920387.3661.7.camel@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I think that function dsm_impl_windows() with EACCES error should not
do ereport() with FATAL level. It works, but it is likely to make an
infinite loop if the user will receive EACCES error.
On Чт, 2015-10-15 at 17:46 +0300, Dmitry Vasilyev wrote:
> I’ve created 2 unprivileged users: user1 and user2; and registered 2
> services thorough pg_ctl register respectively under these 2 users.
> If
> first service is running second could not start and vice versa.
>
>
> ----
> Dmitry Vasilyev
> Postgres Professional: http://www.postgrespro.com
> Russian Postgres Company
>
>
>
--
----
Dmitry Vasilyev
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:win_dsm.patch (text/x-patch, 536B) downloaddiff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.cnew file mode 100644index 921f029..417048e
*** a/src/backend/storage/ipc/dsm_impl.c
--- b/src/backend/storage/ipc/dsm_impl.c
*************** dsm_impl_windows(dsm_op op, dsm_handle h
*** 689,694 ****
--- 689,696 ----
if (!hmap)
{
_dosmaperr(GetLastError());
+ if (errno == EACCES)+ return false;
ereport(elevel,
(errcode_for_dynamic_shared_memory(),
errmsg("could not create shared memory segment \"%s\": %m",
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: d.vasilyev@postgrespro.ru
Subject: Re: Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”
In-Reply-To: <1444921511.3661.13.camel@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox