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 1sWxgc-000ifx-8V for pgsql-general@arkaria.postgresql.org; Thu, 25 Jul 2024 12:35:10 +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 1sWxga-00EZyV-Oy for pgsql-general@arkaria.postgresql.org; Thu, 25 Jul 2024 12:35:08 +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 1sWxga-00EZyM-B2 for pgsql-general@lists.postgresql.org; Thu, 25 Jul 2024 12:35:08 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sWxgT-001N6o-Uf for pgsql-general@lists.postgresql.org; Thu, 25 Jul 2024 12:35:07 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5a156557026so985980a12.2 for ; Thu, 25 Jul 2024 05:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721910900; x=1722515700; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WpS3/Gaw9QCzRxpIgn74BQdJTTAU+KYtFo3Ecu1HXYY=; b=U7Z/AiGKgRr3ppB9ztxRz5rOD4XoJ1915WnyqMz40Eun/D32sHCJ6I0t8EPwXRdl2c 7Ma7I7MujlPR9V2DyFXE/HylUVHeLcyWvM56afnP+UJJt6njNjfsJ8ydbEPskcWLKA6c UD+5Nc45unlBa24uJr2T980VPhpqPONNTqdePTo7lPWpBGXUsvuI896p0tA/Ou3kbM3M BzG9GA5QH771c3Xj9qXGYQGr+ENQDRlfw1CW5F//t8YtYhdrivFj7FY8UwWY6JHfZOXc Du5l7YkdeowY3KtKgNhONtLyI4vlwjkK1J/4OqCxiUz4Ec9PA68N4G77aEldIPAgOgX8 Fa1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721910900; x=1722515700; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WpS3/Gaw9QCzRxpIgn74BQdJTTAU+KYtFo3Ecu1HXYY=; b=JAG3t5s9jGmRpT506uPkivyzcSz1uknTBlw4/UwmQPE5MSUWc+iaTlAwvLM/Cis9Ny To84ZOXcGXHT10GaUYy1OweA2TB5Pj/bjupvV9IE7zJlY7CM359+gc+269kiAzGwJvlm Ujn0s3BQ9vLINWae+rLJS/M+X0nOkjh4DWPVkfQnLETG7fkpt4QdjlSZCl4g8G3Yntrc xyxY5VAOXEi7JQdu35j8hcbuwDqaleSPmQ5N3ku/VqZQ7hc1DDrYsYD8CK4Cc5Vu+215 UGFE3ozCDedWKhlPohvhhONZnci22dMSYjhnwBaO7tcmmcb3L8j/K2gL+o7zWXeI9a2w xF1A== X-Gm-Message-State: AOJu0YyEKJ2iNA9qE1+YqcBGIcQexh4n3rCRFhKgt8f6IFB5OKN19wLW Ov+0ZYpInO1qWcZ023XP/ltsonqzRJ94HA5yaxhWg7+OmvXwJ1Qc X-Google-Smtp-Source: AGHT+IFRPF7hxBwYF37gH7yzoItlZ0Pz1NwVsvUlxbfI6S1fshlIrJp5PquK4RN2SWqvQUNuNbL+DQ== X-Received: by 2002:a17:906:d54f:b0:a7a:a06b:eebe with SMTP id a640c23a62f3a-a7acb38ef54mr151193866b.9.1721910900096; Thu, 25 Jul 2024 05:35:00 -0700 (PDT) Received: from smtpclient.apple ([188.212.112.125]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad4acd7sm69879966b.140.2024.07.25.05.34.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2024 05:34:59 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Memory issues with PostgreSQL 15 From: Alban Hertroys In-Reply-To: Date: Thu, 25 Jul 2024 14:34:49 +0200 Cc: "pgsql-general@lists.postgresql.org" , Francisco Olarte , Tom Lane , Eric Wong Content-Transfer-Encoding: quoted-printable Message-Id: References: <3332.1717019021@sss.pgh.pa.us> To: =?utf-8?Q?Christian_Schr=C3=B6der?= X-Mailer: Apple Mail (2.3774.600.62) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 25 Jul 2024, at 12:58, Christian Schr=C3=B6der = wrote: >=20 > Hi all, > I started this discussion in May and was then dragged into other = topics, so I could never follow up. Sorry for that! > Since then, the problem has resurfaced from time to time. Right now, = we seem to have issues again, which gives me the opportunity to follow = up on your various suggestions. >=20 > The current error messages are similar to what we have seen before: >=20 > <2024-07-25 12:27:38 CEST - > LOG: could not fork autovacuum worker = process: Cannot allocate memory > <2024-07-25 12:27:38 CEST - mailprocessor> ERROR: could not resize = shared memory segment "/PostgreSQL.1226901392" to 189280 bytes: No space = left on device We sometimes encounter a similar issue, but with disk space - on a 1TB = virtual disk of which usually only about 1/4th is in use. Our hypothesis is that sometimes some long-running transactions need to = process a lot of data and put so much of it in temporary tables that = they fill up the remaining space. We=E2=80=99ve seen the disk space = climb and hit the =E2=80=99No space left on device=E2=80=99 mark - at = which point the transactions get aborted and rolled back, putting us = back at the 1/4th of space in use situation. Have you been able to catch your shared memory shortage in the act? I = suspect that the stats you showed in your message were those after = rollback. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.