From Swati.Yadav@Xoriant.Com Mon Mar 15 10:00:06 2021 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 1lLkhz-0001XI-VA for pgsql-general@arkaria.postgresql.org; Mon, 15 Mar 2021 10:44:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lLkhy-0005x5-Ni for pgsql-general@arkaria.postgresql.org; Mon, 15 Mar 2021 10:44:22 +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 1lLk2m-0004Pa-FE for pgsql-general@lists.postgresql.org; Mon, 15 Mar 2021 10:01:48 +0000 Received: from [115.114.9.131] (helo=emailpun.xoriant.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1lLk2j-0004uu-P3 for pgsql-general@lists.postgresql.org; Mon, 15 Mar 2021 10:01:47 +0000 Received: from XORPUN-MBX02.India.XoriantCorp.com (10.20.0.12) by XORPUN-MBX02.India.XoriantCorp.com (10.20.0.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Mar 2021 15:30:06 +0530 Received: from XORPUN-MBX02.India.XoriantCorp.com ([fe80::80ab:1334:ad7e:3212]) by XORPUN-MBX02.India.XoriantCorp.com ([fe80::80ab:1334:ad7e:3212%13]) with mapi id 15.00.1497.012; Mon, 15 Mar 2021 15:30:06 +0530 From: Swati yadav To: "pgsql-general@lists.postgresql.org" Subject: Need help on understanding of wal_keep-segments and max_wal_size dependency. Thread-Topic: Need help on understanding of wal_keep-segments and max_wal_size dependency. Thread-Index: AQHXGYHeoTkr9j//zUuVJF1ZZyk6QQ== Date: Mon, 15 Mar 2021 10:00:06 +0000 Message-ID: <1615802487270.78115@Xoriant.Com> Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [165.225.106.55] Content-Type: multipart/alternative; boundary="_000_161580248727078115XoriantCom_" MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 115.114.9.131 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_161580248727078115XoriantCom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Team We are using streaming replication without feature archiving and replicati= on slots. Could you please help us in understanding how replication will works when I= set max_wal_size to 1GB, wal_keep_segments set to 300?. ?In this scenario, replication is getting failed. Could you please brief u= s the causes of failure and how can we fix this issue, apart from using the= feature archiving? and replication slots. Thanks & Regards Swati Yadav | Xoriant Solutions Pvt. Ltd. 5th floor, Amar Paradigm, Baner Road, Baner, Near D'mart, Pune - 411 045 http://www.xoriant.com --_000_161580248727078115XoriantCom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello Team


We are using streaming replication without  feature archiving and replication slots.


Could you please help us in understanding how replication will works&nbs= p;when I set max_wal_size to 1GB, wal_keep_segments  set to 300​.


​= In this scenario, replication is getting failed.  Coul= d you please brief us the causes of failure and how can we fix this issue, apart from&nbs= p;using the feature archiving​ and replication slots.






Thanks & Regards
Swati Yadav | Xoriant Solutions Pvt. Ltd.  
5th floor, Amar Paradigm, Baner Road, Baner,

Near D’mart, Pune - 411 045
http://www.xoriant.com

--_000_161580248727078115XoriantCom_-- From laurenz.albe@cybertec.at Mon Mar 15 13:44:07 2021 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 1lLnWB-0000Zw-0G for pgsql-general@arkaria.postgresql.org; Mon, 15 Mar 2021 13:44:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lLnW9-0003rU-QR for pgsql-general@arkaria.postgresql.org; Mon, 15 Mar 2021 13:44:21 +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 1lLnW9-0003rN-IE for pgsql-general@lists.postgresql.org; Mon, 15 Mar 2021 13:44:21 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lLnW2-0006gO-2X for pgsql-general@lists.postgresql.org; Mon, 15 Mar 2021 13:44:20 +0000 Received: by mail-ed1-x532.google.com with SMTP id y6so17344586eds.1 for ; Mon, 15 Mar 2021 06:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=TiWNhW+2ACGtQ/Dx9vJqJtC8JbXWQDsUmlgLhbDjrI4=; b=sWo4USTaWk3xrbYtcOolWHas5xeWQLyXQ/Vr/v5k6HnmfXQ3kKnri0NJvkaNGMW9NT vx9dleXiOaJY+AAggWe9xRZqZI/KoOO6ldJwtG6sRB+zx5WefZLa+YRMazAPdZ6Mo8bX KjqgOB8+Z3l4Gv/dTwJqITCSvwouM1su0PvsETNfoSx4oTOox5VemPALuv3MpYctA2IQ szC2jty70sQgKJisjQ6SJtiaXC/k1C8SikUSb9GBBc7ywvVkB5l9YqYmLEeNrHUmh7mz 4QemTXjHOev05BV/EwGo2BcbWS4AVhXPePFtImk9C5Y49QL2cdiFoGpGCAVlXiDAzI7M U3lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=TiWNhW+2ACGtQ/Dx9vJqJtC8JbXWQDsUmlgLhbDjrI4=; b=dxuf8F1/RNW8IjGbSvO8nnS/JvzDLcBmC7b3ifL1fgfXXkfEVh5AR2SmdYGv5KW/pi NuGf68f1lcN9IyHnvaWtbF5y5YU4JH9HFrKUGpRBvZdBuo6h6gX5ln/D+h+VG/kB46mK Ds8Z7pMViLsQFoNlv1hhdDzxsjaBbIY7b3nCaqfSfmaMmLWVX2MFxiEs4AiriGwJhnnM m0Oh4cQR67nAQHb+U0GRA566nBQ+lyXA+z2hX2rRtjKsJV01W79WfZW0WWa1bxg3vkGH AGMwwcRd0zg4cN4+GTJ+I4JIofnJeAtyD1MeqEa4cnU6aNVZ6eu/nPYPnvRwBQh0iZhU 63Ag== X-Gm-Message-State: AOAM531F9/M2MFP0iSpF5mxcFEA729lCQa5Po1uzy3Cljpxt2UP4O3lQ m9YRMPuAs3VzjCDxBam7CP+axMsQ0jN3KA== X-Google-Smtp-Source: ABdhPJzxRcDwi9YVsp2iLOclVoMecG0t768pccZXgB8fThXl1E9BZSAqcUDVQKRglNwB3KhuX/1IjA== X-Received: by 2002:a05:6402:1051:: with SMTP id e17mr8923726edu.42.1615815851472; Mon, 15 Mar 2021 06:44:11 -0700 (PDT) Received: from localhost.localdomain (217-149-171-45.nat.highway.telekom.at. [217.149.171.45]) by smtp.gmail.com with ESMTPSA id f3sm7457090ejd.42.2021.03.15.06.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 06:44:11 -0700 (PDT) Message-ID: Subject: Re: Need help on understanding of wal_keep-segments and max_wal_size dependency. From: Laurenz Albe To: Swati yadav , "pgsql-general@lists.postgresql.org" Date: Mon, 15 Mar 2021 14:44:07 +0100 In-Reply-To: <1615802487270.78115@Xoriant.Com> References: <1615802487270.78115@Xoriant.Com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) 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 Mon, 2021-03-15 at 10:00 +0000, Swati yadav wrote: > We are using streaming replication without feature archiving and replication slots. > > Could you please help us in understanding how replication will works > when I set max_wal_size to 1GB, wal_keep_segments set to 300. > > In this scenario, replication is getting failed. Could you please brief > us the causes of failure and how can we fix this issue, apart from using > the feature archiving and replication slots. "wal_keep_size" is irrelevant to the question. "wal_keep_segments = 300" makes PostgreSQL keep 300 old WAL segments around so that standby servers can catch up after a bit of downtime. If, however, the downtime is long enough that the standby needs WAL that is in an even earlier WAL segment that has already been archived and deleted, the standby won't be able to catch up any more. If you don't want to use "restore_command" or replication slots, your only option is to increase "wal_keep_segments". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com