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 1fYZxV-0000Gc-Mv for pgsql-admin@arkaria.postgresql.org; Thu, 28 Jun 2018 16:39:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fYZxU-0005MT-4M for pgsql-admin@arkaria.postgresql.org; Thu, 28 Jun 2018 16:39:48 +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.89) (envelope-from ) id 1fYZxT-0005MM-TO for pgsql-admin@lists.postgresql.org; Thu, 28 Jun 2018 16:39:47 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fYZxQ-0002SM-Pz for pgsql-admin@lists.postgresql.org; Thu, 28 Jun 2018 16:39:47 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9035D21C5C; Thu, 28 Jun 2018 12:39:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 28 Jun 2018 12:39:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=cJD8QmQryMsppfNhHIbx8pDJ1ZtsV STNEBAMaUUev/M=; b=rb+SXcr5lhBotSbXxb2CbdmgBozVDGWPDRA447ywRbtPs OkpZVccTmbhWjyuhhqqAkM1WsTgB/N8shKmIc6/YqoNJ0znFwb84sN4MDco5S4tm eTDRgzRd22sonTVHNF00nd+mvW3OBYNSlO3GqzvF+K7zW5bQrqWQiGG//8Aqi67f 0lWnUd3IFv075583vL+S0Jg8Krwixn9cHoB1trRV/SbvrkfOhLELm/u1AN+BdXdB UHZb7mfHZboA3HnaokISzuRmFxL0FgfehkWyZ8aunAHUXoV3iZPBRVPRl2Q8AVsm PHrNhBGJPhTt0zUCMjVc7ua5s3ZBJjENreNLODxfw== 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=fm3; bh=cJD8Qm QryMsppfNhHIbx8pDJ1ZtsVSTNEBAMaUUev/M=; b=UE01bHC/LUgJt6YD1xqe5l +CSC63QhyTNcc/IwiWfmxkSReJ5z/m2IrBEyBncbKu+9EatOPlIKL9PiaIwpRI00 3xUHqhjRSQ8f47Gosb362zwbgL1jhwGLacFyj+4G6CqiYZr57ShXYikdXqo2HRyg 5xrVzAn25s4WUAHCVRaUYAWsVK+1ESUD4xR8QiGJEJslChmXn2NOr0EOInyUYu4n Odf8bLVKS4WF+y3KdT+KrfYIIgGbXYl7nU9fGkCDArLiiDPXGoXAijTplAkOtNHg alTcBXF28aS01hxOcuaEXXy0Zp2s4MI6Z3p4spKQcMDHzxptAIfzUxPnxP7iyVwA == X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id ECE85E491A; Thu, 28 Jun 2018 12:39:42 -0400 (EDT) Date: Thu, 28 Jun 2018 09:39:42 -0700 From: Andres Freund To: Vijaykumar Jain Cc: "pgsql-admin@lists.postgresql.org" Subject: Re: standby replication server throws invalid memory alloc request size , does not start up Message-ID: <20180628163942.7kqmqdubfcxdihgs@alap3.anarazel.de> References: <1E4C5445-F307-4AE9-B1B9-C85A38B0D930@opentable.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1E4C5445-F307-4AE9-B1B9-C85A38B0D930@opentable.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-06-28 13:17:52 +0000, Vijaykumar Jain wrote: > Hi All, > > This is my first postgres query to admin list, so if I am not following the right standards for asking the question, pls let me know 😊 > > > The problem: > > I have a postgres cluster as > > A (primary)-> streaming replication -> B(hot_standby=on) > > We had a power outage in one of the data centers, and when we got back, one of the databases servers (B the standby node) seem to show weird errors and is not starting up. A recovered fine, and it running fine. > > --------- logs > > 2018-06-25 10:57:04 UTC HINT: In a moment you should be able to reconnect to the database and repeat your command. > 2018-06-25 10:57:04 UTC WARNING: terminating connection because of crash of another server process > 2018-06-25 10:57:04 UTC DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. > 2018-06-25 10:57:04 UTC HINT: In a moment you should be able to reconnect to the database and repeat your command. This sounds like either was a crash or you shutdown the server with force. Could you post the preceding lines? > 2018-06-25 10:57:04 UTC LOG: database system is shut down > 2018-06-27 16:59:28 UTC LOG: listening on IPv4 address "0.0.0.0", port 5432 > 2018-06-27 16:59:28 UTC LOG: listening on IPv6 address "::", port 5432 > 2018-06-27 16:59:28 UTC LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" > 2018-06-27 16:59:28 UTC LOG: database system was interrupted while in recovery at log time 2018-06-25 10:52:21 UTC > 2018-06-27 16:59:28 UTC HINT: If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target. > 2018-06-27 16:59:28 UTC LOG: entering standby mode > 2018-06-27 16:59:28 UTC LOG: recovered replication state of node 1 to 63/89B52A98 > 2018-06-27 16:59:28 UTC LOG: redo starts at 9A/6F1B3888 > 2018-06-27 16:59:28 UTC LOG: consistent recovery state reached at 9A/6F25BFF0 > 2018-06-27 16:59:28 UTC FATAL: invalid memory alloc request size 1768185856 > 2018-06-27 16:59:28 UTC LOG: database system is ready to accept read only connections > 2018-06-27 16:59:28 UTC LOG: startup process (PID 11829) exited with exit code 1 > 2018-06-27 16:59:28 UTC LOG: terminating any other active server processes > 2018-06-27 16:59:28 UTC LOG: database system is shut down Could you restart the server with log_min_messages set to debug3, and change log_line_prefix so it includs the pid? Greetings, Andres Freund