Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpBe0-0003xI-RF for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 12:08:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpBdz-0004WZ-2v for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 12:08:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpBdy-0004WK-Ls for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 12:08:18 +0000 Received: from tonga.chezphil.org ([163.172.168.227]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fpBdv-0000eQ-BI for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 12:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chezphil.org; s=20171026; h=From:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Date:Cc:To:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gdxu7gJ/FMRb4GWOlE7wR6jXkog9QTJ0Oiew38ckdBU=; b=n+HvqTZOG4H79aFXUwoiH5bhB Wp+VB3ZquTojS3/fJaWJcNmc8jmKSpy2+rjzJ+2FnYmiUAGNhLv35qXI9BGPlDDid4mU+XywVf0cy LEAGkBZaPOCizyLCmbgnI0PxAGfgdXbWB8AcwFPpOEd2Xsj1cXevFTxGFkygnAqQneHzM=; Received: from localhost ([127.0.0.1] helo=chezphil.org) by tonga.chezphil.org with esmtp (Exim 4.89) (envelope-from ) id 1fpBdt-0001Rp-4m for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 13:08:13 +0100 Received: from localhost ([::ffff:127.0.0.1]) by tonga with smtp (dmsmtpd 0.00001); Mon, 13 Aug 2018 13:08:13 +0100 To: Cc: "Adrian Klaver" Date: Mon, 13 Aug 2018 13:08:12 +0100 Subject: Re: Replication failure, slave requesting old segments Message-ID: <1534162092902@dmwebmail.dmwebmail.chezphil.org> In-Reply-To: <31ba3812-6a0a-4639-5386-e804e59bc322@aklaver.com> References: <31ba3812-6a0a-4639-5386-e804e59bc322@aklaver.com> X-Mailer: Decimail Webmail 3alpha16 MIME-Version: 1.0 Content-Type: text/plain; format="flowed"; charset="UTF-8" From: "Phil Endecott" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver wrote: > On 08/12/2018 02:56 PM, Phil Endecott wrote: >> Anyway.  Do others agree that my issue was the result of >> wal_keep_segments=0 ? > > Only as a sub-issue of the slave losing contact with the master. The > basic problem is maintaining two separate operations, archiving and > streaming, in sync. If either or some combination of both lose > synchronization then it is anyone's guess on what is appropriate for > wal_keep_segments. Really? I thought the intention was that the system should be able to recover reliably when the slave reconnects after a period of downtime, subject only to there being sufficient network/CPU/disk bandwidth etc. for it to eventually catch up. If that's not true, I think the docs need an even more extensive overhaul! Suggestion for the paragraph that I quoted before from 26.2.5: "If you set up a WAL archive that's accessible from the standby, it's anyone's guess what is appropriate for wal_keep_segments." Regards, Phil.