Re: Too many logs are written on Windows (LOG: could not reserveshared memory region (addr=%p) for child %p:) - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Too many logs are written on Windows (LOG: could not reserveshared memory region (addr=%p) for child %p:)
Date
Msg-id 20181207074559.GA2960480@rfd.leadboat.com
Whole thread Raw
In response to Re: Too many logs are written on Windows (LOG: could not reserveshared memory region (addr=%p) for child %p:)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Nov 21, 2018 at 10:05:34AM -0500, Robert Haas wrote:
> On Tue, Nov 20, 2018 at 1:21 AM Takahashi, Ryohei <r.takahashi_2@jp.fujitsu.com> wrote:
> > My customer uses PostgreSQL on Windows and hits the problem that following log is written to the server logs too
frequently(250 thousand times per day).
 
> > "LOG:  could not reserve shared memory region (addr=%p) for child %p:"

> > According to the comment of internal_forkexec(), pgwin32_ReserveSharedMemoryRegion() sometimes fails if ASLR is
active.If so, I think administrators are not interested in this log since it is a normal event.
 

Windows ASLR can't explain your system's behavior.

> You might be right, but maybe we should first try to understand why
> this is happening so frequently.  Maybe it's not that normal.

When PostgreSQL installed that workaround, we weren't aware of any system
where this message was common enough to make the log volume a problem.  I
agree the message is harmful on your system, but I'm not inclined to change it
to DEBUG1 for the benefit of one system.  Can you adopt pgbouncer, to reduce
the frequency of starting new backend processes?  That should improve your
performance, too.

Could you collect the information
http://postgr.es/m/20181203053506.GB2860387@rfd.leadboat.com requests?  That
may help us understand your system's unusual behavior.  (The issue in that
thread is related but not identical.)


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Should new partitions inherit their tablespace from their parent?
Next
From: Andrey Borodin
Date:
Subject: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock