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
diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c new file mode 100644 index 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",
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers