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 1rp7nr-005Bw9-0l for pgsql-general@arkaria.postgresql.org; Tue, 26 Mar 2024 14:29:27 +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 1rp7np-00G0P2-FU for pgsql-general@arkaria.postgresql.org; Tue, 26 Mar 2024 14:29:25 +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 1rp7np-00G0Os-58 for pgsql-general@lists.postgresql.org; Tue, 26 Mar 2024 14:29:25 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp7nl-006XhP-J3 for pgsql-general@postgresql.org; Tue, 26 Mar 2024 14:29:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 42QETLkq2821430; Tue, 26 Mar 2024 10:29:22 -0400 From: Tom Lane To: Don Seiler cc: Postgres General Subject: Re: Use of max_slot_wal_keep_size parameter In-reply-to: References: <2818930.1711462144@sss.pgh.pa.us> Comments: In-reply-to Don Seiler message dated "Tue, 26 Mar 2024 09:16:05 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2821428.1711463361.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 26 Mar 2024 10:29:21 -0400 Message-ID: <2821429.1711463361@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Don Seiler writes: > On Tue, Mar 26, 2024 at 9:09 AM Tom Lane wrote: >> ... So you could overshoot the specified target by >> more or less the amount of WAL that could be emitted between two >> checkpoints. Perhaps it's tighter nowadays, but I really doubt that >> it's exact-to-the-kilobyte-at-all-times. > In this case, the total volume size was 60GB and we had the parameter set > to 58GB but I imagine that can still be overwhelmed quickly. Maybe we > should target a 20% buffer zone? We have wal_keep_size defaulted at 0. Can you measure your WAL emission rate? What you want I think is some small multiple of the max amount of WAL emitted between checkpoints. regards, tom lane