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 1fqKVn-0000UA-I0 for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 15:48:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqKVl-0002A6-7A for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 15:48:33 +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 1fqKVk-00029z-RN for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 15:48:33 +0000 Received: from ec2-34-255-138-49.eu-west-1.compute.amazonaws.com ([34.255.138.49] helo=zimbabwe.chezphil.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fqKVi-0008KD-0A for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 15:48:31 +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:To:Sender:Reply-To:Cc: 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=FC+1JR0dSbyiZc5uljVn7QgXF4w50KGYZ/S3KlRCbPI=; b=PeN4Vwup3Uhn0ba/YV3cBr5v5 HWz5hVs9CMtzzkjdXiXInpHl7wJOgOqNYzAXQyTF4BrgBy0fI3BfgvGKI6MZRcvl7+ieQg7ZGN9dB T/oZsvFHhFcK1bQBNmVx6OKO2/o6J/rRM2MEiDd4+N65ZkANBxGjYYYfx1VFkospWxwrM=; Received: from localhost ([127.0.0.1] helo=chezphil.org) by zimbabwe.chezphil.org with esmtp (Exim 4.89) (envelope-from ) id 1fqKVf-0003mL-Oz for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 16:48:27 +0100 Received: from localhost ([::ffff:127.0.0.1]) by zimbabwe with smtp (dmsmtpd 0.00001); Thu, 16 Aug 2018 16:48:27 +0100 To: "Adrian Klaver" , Date: Thu, 16 Aug 2018 16:48:27 +0100 Subject: Re: During promotion, new master tries to archive same segment twice Message-ID: <1534434507556@dmwebmail.dmwebmail.chezphil.org> In-Reply-To: References: 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/16/2018 01:48 AM, Phil Endecott wrote: >> Adrian Klaver wrote: >>> On 08/15/2018 01:25 PM, Phil Endecott wrote: >>>> Dear Experts, >>>> > >>> The above is not clear to me. My best guess: >>> > >> It's not part of the error for the archive command; it's just the >> next thing in the log file.  Y is (1) trying write WAL segment >> E8 to the Y-to-Z archive and failing because it is already there and >> (2) trying to read WAL segment E9 from the X-to-Y archive and failing >> because it doesn't exist (and never will).  (1) is the problem, (2) is >> expected. > > Hmm, still not sure why they are both showing up in the same LOG: entry > as the entry was for the failure of the archive_command. It's not. It's just the next thing in the log file. It seems that stderr output from scp appears raw in the log file. > What is archive_mode set to on Y? archive_mode = always Regards, Phil.