Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKL4C-0005L0-Em for pgsql-admin@arkaria.postgresql.org; Thu, 30 Nov 2017 09:23:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKL4B-0005Ll-Ot for pgsql-admin@arkaria.postgresql.org; Thu, 30 Nov 2017 09:23:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eKL4B-0005LS-9A for pgsql-admin@lists.postgresql.org; Thu, 30 Nov 2017 09:23:35 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eKL46-0002yf-7C for pgsql-admin@postgresql.org; Thu, 30 Nov 2017 09:23:33 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4325F20D06; Thu, 30 Nov 2017 04:23:28 -0500 (EST) Received: from web4 ([10.202.2.214]) by compute7.internal (MEProxy); Thu, 30 Nov 2017 04:23:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hintbits.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=NmWyANsztlHw3pFLR4UeJszHu+ OpfXjQJ/i0x+COXzE=; b=NxSQ+WkZUT5gXWKc0rBzmcsNuaklV9HpdiQUhswo6l ykaAVogPNZTMafNjuicSh6TBwoTRPKoNqruHv8hY6FAit2TryhqyxH/Jet15gLaT tN2A70k6Xi7aJrIng2N2kI5Kci6QOv7iO90VIU81m07hmEbRGpBJVDBmLtcrZgUB w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=NmWyAN sztlHw3pFLR4UeJszHu+OpfXjQJ/i0x+COXzE=; b=M2Vs3jZ9RKRP35LHluusXy dQQKrHX8pG25CIcyytnud8+Lzt9XKj/O43Ypu4l8HPNSKHcoELz68xXj+83UBiMV 81KKjdbRdOwweiCDfuxxFv569pwazU6Lvf1A6aavYaJxlAe70yyI5NL+oQZFLaB0 cY3QRjOS0OilgtljhqDJIvjOI9+uKh1rIk5wlIWdGY4oE6PFXT5bXR3THIsuE/Py 8ssyTM2gZpvPclqbJwchBg5jeNLcmgtU8knjnUJkyDNKoXTqvUEQqtLugixzcFE1 5Hp0wxz27nKAP0mwXhznnyqEuH7MY+YkIOy7N+SCrD8hz1ym72RuHoit+96kHhbw == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 26833BA798; Thu, 30 Nov 2017 04:23:28 -0500 (EST) Message-Id: <1512033808.1345812.1189147312.07BDA54D@webmail.messagingengine.com> From: Alex Kliukin To: Alvaro Herrera Cc: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-a169161c In-Reply-To: <20171129232243.vk5ik5szknppo3it@alvherre.pgsql> References: <20171129232243.vk5ik5szknppo3it@alvherre.pgsql> Date: Thu, 30 Nov 2017 10:23:28 +0100 Subject: Re: 'replication checkpoint has wrong magic' on the newly cloned replicas List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Nov 30, 2017, at 00:22, Alvaro Herrera wrote: > Alex Kliukin wrote: > > > 2017-11-15 13:15:46.673 CET,,,15154,,5a0c2ff1.3b32,5,,2017-11-15 > > 13:15:45 CET,,0,PANIC,XX000,"replication checkpoint has wrong magic > > 5714534 instead of 307747550",,,,,,,,,"" > > Uhh ... I had never heard of this "replication checkpoint" thing. It is > part of replication origins feature, which is fairly new stuff (see > src/backend/replication/logical/origin.c). I'd bet this problem is > related to a bug in logical replication "origins" code rather than any > procedural problems in your base-backup taking setup ... We are not using logical replication or logical decoding on those hosts. On the master, pg_replication_origin is empty as well as pg_replication_slots Those masters were fairly recently (around 2 months ago) upgraded from 9.3. > > I wonder if there is some truncation of the 0x1257DADE value that > produces the 5714534 value you're seeing -- something related to a > pg_logical/replorigin_checkpoint file being written partially while the > backup is being taken. 307747550 = 0x1257DADE 0001 0010 0101 0111 1101 1010 1101 1110 5714534 = 0x573266 = w2f ASCII 0000 0000 0101 0111 0011 0010 0110 0110 I see no patterns here. What is interesting is that 0x573266 is actually mentioned in relcache.c #define RELCACHE_INIT_FILENAME "pg_internal.init" #define RELCACHE_INIT_FILEMAGIC 0x573266 /* version ID value */ it's a file magic for the relcache init files, but given that the copy is performed by just compressing and decompressing the original files I don't see how those 2 could be confused by software. > > Another point towards not including pg_logical/ contents when taking a > base backup, I guess ... In our case wouldn't it just mask the real issue? -- Sincerely, Alex