Re: Too many logs are written on Windows (LOG: could not reserve shared memory region (addr=%p) for child %p:)

From: Noah Misch <noah(at)leadboat(dot)com>
To: r(dot)takahashi_2(at)jp(dot)fujitsu(dot)com
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Too many logs are written on Windows (LOG: could not reserve shared memory region (addr=%p) for child %p:)
Date: 2018-12-07 07:45:59
Message-ID: 20181207074559.GA2960480@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)takahashi_2(at)jp(dot)fujitsu(dot)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.)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2018-12-07 09:14:31 Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock
Previous Message Michael Paquier 2018-12-07 07:15:08 Re: Should new partitions inherit their tablespace from their parent?