Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nM3yr-0005y4-DW for pgsql-admin@arkaria.postgresql.org; Mon, 21 Feb 2022 08:23:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nM3yq-0007RN-4d for pgsql-admin@arkaria.postgresql.org; Mon, 21 Feb 2022 08:23:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nM3yp-0007PI-JF for pgsql-admin@lists.postgresql.org; Mon, 21 Feb 2022 08:23:35 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nM3ym-0001Re-JX for pgsql-admin@lists.postgresql.org; Mon, 21 Feb 2022 08:23:34 +0000 Received: by mail-ej1-x631.google.com with SMTP id gb39so31205290ejc.1 for ; Mon, 21 Feb 2022 00:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=yQCxqnQ/lLbhsCPPBvnGVA4AmoCPG2Ol9UGoXqCSRaI=; b=S2Ba26r/+Aq3FicRxehadW8gEDWlkZWKel8+Ctupn+e2q3TE9CYgdtNESkRuLjHRcc OGr/mHlbLI9OEwY+OVbBcc0mghHjcOGA/BOZ+LzwexXyyBuGmOZE7yjd5Lhanh3ZM7aT 4hElFo5QY2b5rBbpsKIpgWroVkeC+Fz9tPiXwt9ZXGkUFxccjF18D0KPjRT5p9iXhWFL t6ujKQnXSXaYgmfmjkBwSt+gk9huAKyL8gd9dCRDTVaYFrnsVhjfXbdoUl/7v5/IbgUP KJgQf/uwVKj15g573+XOOzjUchPhK/KK9EkffL8hlc2LYGjYlDyxe2HqL+cayE2z8OTE UhHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=yQCxqnQ/lLbhsCPPBvnGVA4AmoCPG2Ol9UGoXqCSRaI=; b=BoATRVhapm/fQtFQ1p45ogNydSfTgIjFuUf3Doa2SUDLWeilrWbHd1yAvaF8zYRh6n 79E0QNVed19Qt2UXtQlfTjklPOqfFILpAZAvz4z8p/Ugk8pNra9HEAVj0yShF6vf32mv oxO+U5qyNzAQgSb5B6BDebLxCOlAukdrAr0KCfN8gLQtoRsaHAMFuyIJfcMk7AERzJiJ jKoex+ked41Sb7cEEYFyMBptgyD64yytrnMawuhozgSdd+fzmUwaW1cP9Xd8PHWdjf69 19BSG1wnHvF1GkdrM0TZW2j+2min4RZo5/Bxzz17A2QSr/mk4wx0+nSrMGljx3ex7Ktt DpSA== X-Gm-Message-State: AOAM530pxchPhstUL2tUtH4ERz+aDm/vhLa3eY0cYUc17Gf9WYn7AbEN 32hqfvWkQai7qklMTFTodYZLCg== X-Google-Smtp-Source: ABdhPJxPs+9SPvR34TOQN6mDkKwqD7ZTRGfAwfovh+Nilh0I3fGnCxemZO8lXQYaq8Ayi4CE+qZplQ== X-Received: by 2002:a17:906:b1d0:b0:6cd:fa02:b427 with SMTP id bv16-20020a170906b1d000b006cdfa02b427mr14684366ejb.99.1645431810680; Mon, 21 Feb 2022 00:23:30 -0800 (PST) Received: from localhost.localdomain ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id g16sm4870158ejf.218.2022.02.21.00.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 00:23:30 -0800 (PST) Message-ID: <924cb7284c36a96a844ab36bc3608763df6182a0.camel@cybertec.at> Subject: Re: postgresql memory problem From: Laurenz Albe To: Kenny Bachman , pgsql-admin@lists.postgresql.org Date: Mon, 21 Feb 2022 09:23:29 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2022-02-21 at 10:56 +0300, Kenny Bachman wrote: > Firstly, I want to thank you all for the amazing help. > I need your guidance with PostgreSQL. So, I have a 3-nodes patroni cluster running PostgreSQL 12.9 version. I got some errors related to a memory issue. > > ERROR:  could not resize shared memory segment "/PostgreSQL.346141036" to 16776236 bytes: No space left on device > > FATAL:  out of memory > DETAIL:  Failed on request of size 128 in-memory context "CacheMemoryContext" > > My PostgreSQL parameters related to memory; > work_mem : 128MB > shared_buffer: 16GB > effective_cache_size: 200GB > maintenance_work_mem: 2GB > > My server profile: > free -g >                     total        used        free      shared  buff/cache   available > Mem:            377          28          22           0         326         347 > Swap:           127           0         127 > > df > tmpfs                        189G  2.0M  189G   1% /dev/shm > > What do you think about this? Can you advise some hints? There should be a memory dump in the PostgreSQL log. Considering the small size of 128, the problem might be somewhere else. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com