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 1svI8b-00Dr7O-K5 for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2024 15:16:38 +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 1svI8a-001p5z-HF for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2024 15:16:36 +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 1svI8a-001p5q-0i for pgsql-general@lists.postgresql.org; Mon, 30 Sep 2024 15:16:36 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1svI8X-001oGO-5Q for pgsql-general@lists.postgresql.org; Mon, 30 Sep 2024 15:16:34 +0000 Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-4584a719ff5so36861731cf.0 for ; Mon, 30 Sep 2024 08:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=americanefficient-com.20230601.gappssmtp.com; s=20230601; t=1727709392; x=1728314192; 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=+M/ugdDUQ5MErBN/JDXASfFe/zGWG7DDC7mzIh+x7Pc=; b=IWkWrikwDrc4Uw4BdwgjT6KATAXzEhUIXBBC217dPP5NCXjsxjaIhpUXUq89F3Ok+Y KXFpl801sFPTneOP6SWkjq78vVgoTLi31rtJpHHxQqujixQnRGCMD8hunjvvzbLjI8WC yiGP9XLZBXCFb8rpNGnbxdaB3bz6/PAhiZRruYVfjUNBnuzMNoV3IQ4HM3Oj2jki+f7h t/3Y3kjy/0e7mGxipnidv6MLQM359mwJz43bJRUsTUQ1GR9QqIozymlSsIUTL5HzRJaT 84Qw5UbsJuKhiNN9zz3bhv8pSvqYmPOdy8FDVv0l+W9r415l2neHBmQWJSCZmC8Moyf9 cV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727709392; x=1728314192; 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=+M/ugdDUQ5MErBN/JDXASfFe/zGWG7DDC7mzIh+x7Pc=; b=BIwNLFC0UJ3jg6Xs/rlkkfxQXFRlJIhQp16NCLC76vsW5CFvzzJWtpRvxvA/dy7Svj KEFOWAn1CTizPDaTDV8ptxteKyrVxVk4PyW68RFf3sz5vIJbZbKKXxIwpVN47JHXwzcl IFMdEE+NtHTVszKsQoYuWDr3/SVuMRbFdRLdMiC5p32kOEPfsUOw7sRtcfVr+y3vNaGZ QgSDC3KSiG4zU3Z+vJrdR/FRK/mdwVsyrm08sxQdxR37S2CzW//HMiaMsJQD6yqN+hm0 /mcwCRMhJIn1LRfrX9Pq3QDLnTD1J6gkvNSYYK2koDs1/Ijc4uB0tJ146fAt8IDTG0E7 md9A== X-Gm-Message-State: AOJu0YxcArKbNIUIeApO/B8PTIi+9DVF75vxf9EqMcznnX2+eBF7Y/Ua pKPbD45Ez4HowV+zaBOUkLbMxqcJwlkE0uVrTigYXyoI9aeNfnimp6PLaoKEPpw= X-Google-Smtp-Source: AGHT+IFdMDzykGRuqqbKqeoElZaC3QnCLsY+0neAiZ9C4iXz0rezkQV+ttZCAgiAokRKwYf7CPeS3Q== X-Received: by 2002:a05:622a:87:b0:458:3a34:b7b5 with SMTP id d75a77b69052e-45c9f247ecdmr188009461cf.26.1727709392130; Mon, 30 Sep 2024 08:16:32 -0700 (PDT) Received: from smtpclient.apple ([50.55.52.42]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45c9f33b4efsm36903221cf.63.2024.09.30.08.16.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Sep 2024 08:16:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: Re: Suggestion for memory parameters From: Philip Semanchuk In-Reply-To: Date: Mon, 30 Sep 2024 11:16:20 -0400 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: References: To: yudhi s X-Mailer: Apple Mail (2.3818.100.11.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 26, 2024, at 7:03=E2=80=AFAM, yudhi s = wrote: >=20 > In a RDS postgres ... > Is it fine to let it use "FreeLocalStorage" unless it goes till zero? Hi Yudhi, FreeLocalStorage and some of the other things you ask about are specific = to AWS RDS, so you might have better luck getting answers on an = RDS-specific mailing list. We also use RDS-hosted Postgres and so I = completely understand how Postgres and RDS are intertwined. We have had runaway queries exhaust FreeLocalStorage. It has been quite = a while since that happened, so my memories are hazy, but I=E2=80=99m = pretty sure that when we used all of FreeLocalStorage, the result was = that Postgres restarted. It might be equivalent to using all memory and = disk space on a standalone system. Once there=E2=80=99s no storage left, = behavior is unpredictable but we can=E2=80=99t be surprised if things = crash. Usually our runaway queries got killed before FreeLocalStorage = filled up, but not always. I second Veem=E2=80=99s suggestion to set work_mem on a per-session = basis. Also note that the doc for work_mem says, =E2=80=9Cthe total = memory used could be many times the value of work_mem; it is necessary = to keep this fact in mind when choosing the value." = https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-W= ORK-MEM Cheers Philip=