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 1nUrH2-00039u-MV for pgsql-general@arkaria.postgresql.org; Thu, 17 Mar 2022 14:38:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nUrH0-0003jP-Iw for pgsql-general@arkaria.postgresql.org; Thu, 17 Mar 2022 14:38:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUrH0-0003jE-6Y for pgsql-general@lists.postgresql.org; Thu, 17 Mar 2022 14:38:42 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nUrGs-0001xY-Vl for pgsql-general@lists.postgresql.org; Thu, 17 Mar 2022 14:38:41 +0000 Received: by mail-ej1-x636.google.com with SMTP id yy13so11197233ejb.2 for ; Thu, 17 Mar 2022 07:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=diS4/wAzwGfD/4pYcnOkZPacdzc4atqlEm2AuLe4pEk=; b=ZG9qtpE2oAP7stu0bhhHjxbPUu3iO0xaVk2fzJpZtw+0X4qxNLpYa7q3nZ3eatQz9P NT0du2zuJeLKHs+EIco7JqskG4e3eMXhlVKG0hhYFWoiSRmKt26EyHoiFvC8CuOFw371 PdxuOPVGClVlMSttvJkmQU9aI9uvSqX67Rbh4MZzSnJKfJzoBhKlnhtY5S2Bz2X4k08T d35eVKBSbbO+grLS4EZBqitfHfUNrFl+fc/rwag6W4Ct8mWd4XD+2YFnpFZdsIltXdDv derV6nqW9husFo61lH3M3pCoXVT72swTyrKrhhxlRoRp6k6YuspSr9jP8M3Ax7EmO7Qk V71w== 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:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=diS4/wAzwGfD/4pYcnOkZPacdzc4atqlEm2AuLe4pEk=; b=yp0MMUk5mu+50HHsgSZRe7gV4/BlKdEjl2LeLYet8G5CtGwf29N0zBn2wNQNHPfLfZ QANAlXB1IXkqYcI+7hWoDDMvInt3I9XCGTeJFiDsc/FZ9OOktKXmR4/ns47cJTl6+1Ha vRxWx6CJC0q9MZoOsPx3YfDKyXaw9mqCLHDtESptLR6tlAp3aJILCbHyINosFp5y26Zj 4bYMBIfiTWfTu77YqbKZu8QxyixpKCnYLrjaNUDISiVzxAW5zxodlSb4Vh70MWoyQkBf Qyo3XOcI1e8+aCMzDNcC8kpd824ZeRxb2sdN3U1ePGkCCrTYhq4K1e0OE8niSZTOz1Wk dc0Q== X-Gm-Message-State: AOAM532UgNgJS1V/FMgSixHJ8x74YgCcZetFLLGrrD94sXHFPzA1GD4A GlQOFy8X5FdrBguxK+vjUP9vcc7FFDI/nw== X-Google-Smtp-Source: ABdhPJyrpZlpE95164LOFwf/jHyaboOu2kyM0I4X4X8XzwZ28NTkaRs8p/Rraye4Pd3HI0w5cpyz+A== X-Received: by 2002:a17:907:6286:b0:6da:6e24:5e43 with SMTP id nd6-20020a170907628600b006da6e245e43mr4699920ejc.449.1647527912865; Thu, 17 Mar 2022 07:38:32 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:1baf:527e:4d24:76aa:18b2]) by smtp.gmail.com with ESMTPSA id hr12-20020a1709073f8c00b006df7d152607sm2328312ejc.83.2022.03.17.07.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 07:38:32 -0700 (PDT) Message-ID: <3ce9de9d04a013c718d174e00cb91bb896591b2a.camel@cybertec.at> Subject: Re: Query on WAL Optimization and Streaming Replication From: Laurenz Albe To: "Shukla, Pranjal" Cc: "pgsql-general@lists.postgresql.org" Date: Thu, 17 Mar 2022 15:38:31 +0100 In-Reply-To: <2B04F626-3467-4D58-8F14-3164529EF96F@akamai.com> References: <69E6DB22-F46D-4798-B47E-A69C5B52FA56@akamai.com> <311862d1f3cf8aa637d25f95a3434eb43bb4d35f.camel@cybertec.at> <2B04F626-3467-4D58-8F14-3164529EF96F@akamai.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-3.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2022-03-17 at 14:05 +0000, Shukla, Pranjal wrote: > From the configuration we have, does it mean that the primary will retain 32 WAL's > of 1 GB each and then start evicting the first WAL as soon as the last one gets filled? > In layman's term, 32GB is huge amount of data and I don't think that much changes > during upgrades. In fact the total size of our database is 56 GB. Is my understanding > correct? > > wal_keep_segments = 32 No, it means that the last 32 WAL segments of size 16MB are retained, that is 0.5 GB. "max_wal_size" is not the size of a WAL segment. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com