Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egzrI-00052g-Gr for pgsql-general@arkaria.postgresql.org; Wed, 31 Jan 2018 21:23:56 +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 1egzrG-0005ZP-Fg for pgsql-general@arkaria.postgresql.org; Wed, 31 Jan 2018 21:23:54 +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.84_2) (envelope-from ) id 1egzrG-0005ZG-1Y for pgsql-general@lists.postgresql.org; Wed, 31 Jan 2018 21:23:54 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1egzrC-0004px-K2 for pgsql-general@lists.postgresql.org; Wed, 31 Jan 2018 21:23:52 +0000 Received: by mail-wr0-x242.google.com with SMTP id g21so16589192wrb.13 for ; Wed, 31 Jan 2018 13:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kAAAdXD6SPjn0qVHdQpC0cBxQ/WG274DHq0rs+293ZY=; b=dvAKnDhmQqbV1jCYMYRjfwGEoITTcyXCUELqN4BXnyXQYq5bDRCYVZGXABq7Gi5izw mPLYx6opLdf8O8IhVFEWi/IWrX1guBiItYVxA8/FuIpWAwZbYYQfvGb7RXug1n23gBZ2 J7pZ40ZyRQtJFXSfAUYSkeHRMegnREJ3LefRJ4C/vZzKiXj0tWW3oDubHyke6AfsNWiS 7LBLZlsawJ85vk5/1Bf2Hnnb+EWGuzQKWCsgFFzNdT5dmNSRvpH1h6Trl2jowibnj5cX JwIDvDhCV5kFYdIr8PgEOQR1zu/sRBV2OBdg/Dm2N8Mjl/G4YWB+N+6xeQCr3sXZzJJM jKqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kAAAdXD6SPjn0qVHdQpC0cBxQ/WG274DHq0rs+293ZY=; b=goaKQAyXjYrcvC4LAQ2TB37vAyNoktMeO1VYyr3+GrEsvWMTHzrFie+DmpJWI2SvRn nw/wKP7BFxPoKcc672xEo2L/aHKwjbCDHmmM20WSmnmW5hn2Jsq8vtNyF4CMV0B5LOul xIKWr9/XDXVt4U7Q1/uLvnoIY3TT/M9bVnL7p9Jc7fsiTUpPx7YKsT/kNSlwtiuPP6MY ulnZu0Uuee/nmDGqQt+Z2ehX/u/6Vx/E2DZIGfg4ceAPySCVv2Jzfzd7tjQcq8MrNTEg I2wVyyielFa5Jq3VoWyFiLzl0Xeq0m0+U1D90e/BIiir8MNO6EhXDwIYODeUTYU0cPh4 BQlQ== X-Gm-Message-State: AKwxytcwnmhMywrIdanVRjcyS4aaA6S/94KzYehpapBVrLdX76mVwEhy UTnCRcYknz+pIrfHqsqXila1WYZrg/vp+Cul9xBswy043tLVx28YxYbRCFISHrIH8Gsvk8Z7NVc 3MUEoEulBmS8AWr6tvpXWAQRrTsjj8MDuFsrk7ArqygAdNBHPxh2TrQeSX+i7uG3//LS3NPjnXt T4LGpzuffdfJ4zS2Oczw4= X-Google-Smtp-Source: AH8x225iLoe1zPciLfFZ07tTKHLQuQXBr66WWTgEGoqvIcRTluofZzQSJ7psX4uaDSKDOwaxCRI8EQ== X-Received: by 10.223.136.89 with SMTP id e25mr16175665wre.140.1517433828449; Wed, 31 Jan 2018 13:23:48 -0800 (PST) Received: from [10.137.2.17] (cable-78.29.240.33.coditel.net. [78.29.240.33]) by smtp.gmail.com with ESMTPSA id x127sm677645wmb.36.2018.01.31.13.23.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 13:23:47 -0800 (PST) Subject: Re: ERROR: invalid memory alloc request size 1073741824 To: Jan Wieck , Stefan Blanke Cc: pgsql-general@lists.postgresql.org References: <733ecd96-48ed-8d49-15e1-413eb535c4c6@framestore.com> <28d517a9-bf36-1a79-c2e7-6356dcd31064@2ndquadrant.com> From: Tomas Vondra Message-ID: <9b1b1008-45fd-8c1a-c45b-6b5be9b24e53@2ndquadrant.com> Date: Wed, 31 Jan 2018 22:23:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/31/2018 09:51 PM, Jan Wieck wrote: > > > On Wed, Jan 31, 2018 at 12:32 PM, Stefan Blanke > > wrote: > > > > > I'll bet you it's not that. It's quite unlikely that would fail with > > exactly 1GB request size. It seems much more like a buffer that we keep > > to be power of 2. The question is which one. > > I had dismissed corruption before writing in. It's exactly 1GB every > time this has happened - and we can dump the full dataset > periodically without issue. > > >> I have my money on a corrupted TOAST entry. Is this happening on > >> trustworthy hardware or beige box with no ECC or RAID? > > It's good quality commercial hardware in our colo - no exactly sure > what. > > > If it is a sporadic issue and you can dump the full dataset, then I just > lost my money (Tomas, you coming to PGConf in Jersey City?). > Unfortunately no, but I'm sure there will be other opportunities to buy me a beer ;-) Like pgcon, for example. > > But then, if this is a plain COPY to stdout ... I am wondering what > could possibly be in that path that wants to allocate 1GB. Or is this > not so plain but rather a COPY ... SELECT ...? > That's what I've been guessing, and why I was asking for a query plan. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services