Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTdXs-007C5R-UV for pgsql-general@arkaria.postgresql.org; Mon, 23 Jun 2025 09:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uTdXq-001Osr-PN for pgsql-general@arkaria.postgresql.org; Mon, 23 Jun 2025 09:32:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTdXq-001Or2-DY for pgsql-general@lists.postgresql.org; Mon, 23 Jun 2025 09:32:55 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uTdXp-003WQK-0g for pgsql-general@lists.postgresql.org; Mon, 23 Jun 2025 09:32:54 +0000 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-b31ca219b97so592092a12.2 for ; Mon, 23 Jun 2025 02:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750671172; x=1751275972; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=zLI7K/fFSjyZxuIChGJt/ALI4h2qSTezmI9K1akpxAo=; b=BfLRo2q6HIYX/Fszv3WgNcGqRXIXCN+fv8z2SPmofZrT8WlzoSQWNIGHEYYKoroKna fVzAyg1/eP+LKeUeZu6SVj/QnhI1u3iCEybL6q5n89rLUtUbV+rJwwiTn3+LWcXLOoyT yIBc7hdJwwhFauvg+BjiDU7D03gT2IVDFCc+P19aw99RrIAwM8D02bZ1F6TB6lRu6rda D6krfyfrgF6/pBN4GHlqN2JgV30tQGOCZmIfh54pBipv8Y87JLz5II1P9tIVqlf3JiFP HJBMmyXDATsrbzAAD5dMer50aKM9nEPuYDtDMbLYRyehwQNvahw6VHKWcr5j/gFDvShM rTcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750671172; x=1751275972; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zLI7K/fFSjyZxuIChGJt/ALI4h2qSTezmI9K1akpxAo=; b=SpuGxnI1A02Rbhgpb4dpxP+I6S3rzWATGCWidt3niKoqe9GEhfCl8PC+1TQhlhF9c0 BJkcYaqH3S2G0M88UEkdRXx+F9MzZ9iJ8aTfhnymBiKlGlukFLb1MpIJ8wTMySydgC3p dZYVmKeuEeKu+L7MvePfbQIGTns6S7Bgskd7bmLa+k/6PB27SIP+MMpYaam87Jj0+Jb0 oaKvq856iiERn4Ud0KRkG0C11G7k/4/HvLnvqohempGdn5NHh3VldbDd1iE8TLObnR2x kP9RD5fu/kvpT/MjS4APQyVqCdRNLI6OBjPkYxPK+7P0pOPOQTwKRxLePEsr3xo+zvaz W4Ow== X-Gm-Message-State: AOJu0YyshikFLkx5EV7Mk0+amnlsZI4hLb7X6vF/kDF1S0Ot0/JKtLiA CREBZfEikctcpHTta/1l/OVEUEfnzIaKmmEDaWQugZewDQlN+rz/Ag9+RIRRLyT17e3d32oWhkj Q1RTDqPnMXEGWRu/kF48XpqET+RrM419mD4ha X-Gm-Gg: ASbGnctA6Sx5LyluyHA9mbq3CeY768e0K536YkYKLcIt1itTsUzfHeb3ECdgwZ90EuV UEUEzDD44xR+rfSBlq69cWAbh04jfQQJ762bfxBMjTyAfxzfntm3ySlDfWsC6b8kBMeFGanqhc6 TSEg2u+0As+eXOq52rfQlSZnBEj2ZD/gbneyOoIUDV+MCD X-Google-Smtp-Source: AGHT+IFtaWv53QovlPOSPaADCBFc3OJPufSSXcz7vDxcP/Xglx12UV3x2bCTtH4kYMcJw+J1AAazvL40HBgsgE0Dsdw= X-Received: by 2002:a17:90b:2ecb:b0:313:f9fc:7214 with SMTP id 98e67ed59e1d1-3159d628b4cmr7395161a91.1.1750671172011; Mon, 23 Jun 2025 02:32:52 -0700 (PDT) MIME-Version: 1.0 References: <61bb2e7f-9c29-4c3f-a316-60780ce5512a@vondra.me> In-Reply-To: <61bb2e7f-9c29-4c3f-a316-60780ce5512a@vondra.me> From: =?UTF-8?B?QWxlxaEgWmVsZW7DvQ==?= Date: Mon, 23 Jun 2025 11:32:40 +0200 X-Gm-Features: AX0GCFsEVGPoe6_2kkJvTTcF4ee8FrMhSfSiUl0jt1pGp2XOg0oVpfZkC55uW8I Message-ID: Subject: Re: PostgreSQL 17.5 - could not map dynamic shared memory segment To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000538cb3063839e537" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000538cb3063839e537 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thanks for the good point: $ sysctl vm.overcommit_memory vm.overcommit_memory =3D 0 That is a difference, the old pg11 running on Ubuntu 18.4 had disabled overcommit (vm.overcommit_memory =3D 2). Anyway, on a dedicated DB server box with 123GB RAM running only vacuum (14 parallel processes (2GB maintenance workmen)) and shared buffers 22GB seems to me unlikely to hit available memory. During Sunday (low load) and Monday so far, it has not reoccurred. Kind regards Ales Zeleny ne 22. 6. 2025 v 0:44 odes=C3=ADlatel Tomas Vondra napsal= : > On 6/21/25 23:09, Ale=C5=A1 Zelen=C3=BD wrote: > > Hello, > > ... > > > > The application benefits from parallel queries, so despite the first > > temptation to disable parallel queries (based on log entries correlatio= n > > only, but is that the root cause?) I did not want to disable parallel > > queries, if there is another workaround/solution/fix available. > > > > Thanks for any hints on how to provide more information if needed, as > > well as for fix/workaround advice. > > > > Could it be that you simply ran out of memory, or perhaps hit the > overcommit? What does sysctl say? > > sysctl vm.overcommit_memory > > And what's CommitLimit/Committed_AS in /proc/meminfo? IIRC the shmem is > counted against the limit, and if the system does not have significant > swap, it's not uncommon to hit that (esp. with overcommit_memory=3D2). > > > regards > > -- > Tomas Vondra > > --000000000000538cb3063839e537 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
Thanks for the good point:
$ sysctl vm.overcommit_memory
vm.overcommit_memory =3D 0

That is a difference, the old pg11 running on Ubuntu= 18.4 had disabled=C2=A0overcommit=C2=A0 (vm.overcommit_memory =3D 2).

Anyway, on a dedicated DB server box with 123GB RAM ru= nning only vacuum (14 parallel processes (2GB maintenance workmen)) and sha= red buffers 22GB seems to me unlikely to hit available memory.
During Sunday (low load) and Monday so far, it has not reoccur= red.

Kind regards Ales Zeleny

ne 22. 6. 2025 v=C2=A00:44 odes=C3=ADlatel Tomas Vondra <tomas@vondra.me> napsal:
On 6/21/25 23:09, Ale=C5=A1 Zel= en=C3=BD wrote:
> Hello,
> ...
>
> The application benefits from parallel queries, so despite the first > temptation to disable parallel queries (based on log entries correlati= on
> only, but is that the root cause?) I did not want to disable parallel<= br> > queries, if there is another workaround/solution/fix available.
>
> Thanks for any hints on how to provide more information if needed, as<= br> > well as for fix/workaround advice.
>

Could it be that you simply ran out of memory, or perhaps hit the
overcommit? What does sysctl say?

=C2=A0 sysctl vm.overcommit_memory

And what's CommitLimit/Committed_AS in /proc/meminfo? IIRC the shmem is=
counted against the limit, and if the system does not have significant
swap, it's not uncommon to hit that (esp. with overcommit_memory=3D2).<= br>

regards

--
Tomas Vondra

--000000000000538cb3063839e537--