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 1faYM4-00086i-EF for pgsql-general@arkaria.postgresql.org; Wed, 04 Jul 2018 03:21: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 1faYM2-0001OR-3q for pgsql-general@arkaria.postgresql.org; Wed, 04 Jul 2018 03:21:18 +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 1faYM0-0001OK-EB for pgsql-general@lists.postgresql.org; Wed, 04 Jul 2018 03:21:17 +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 1faYLu-0006CJ-J4 for pgsql-general@postgresql.org; Wed, 04 Jul 2018 03:21:16 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6432321EF6; Tue, 3 Jul 2018 23:21:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 03 Jul 2018 23:21:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=I8yH0SehHPj+Iur9d7n62VvpYpoBb TRbb97fF+VdTUI=; b=rLCKw7+k6SH3dfHsoZftn0u6FavFvAXmgZe+vuA3d5Z+t AQHwlZjRc7ac0OVYjGfRTI+k+72FnUE5sjsffohEu2Q51dmNpZtv8c+hKsvHPCf6 +G191mxHxl2Xr4b7k8QRYv8Azy9NVk6qWKu423Uul5MqT15NjI3+Xtw5Ud42CjuK PmTZjuMXYvnk+o4EKggsAio/NERhYmnE0p7CIj3zzaD0lIDMZtmONc0e7EXRxfKg Q5vmy8vopF6wrPymoqZUwUqQ5UUrW0n2nuIVx5ACf2YNPQvgQ5YDjiGWUJIRSMEF yhv/24tenSBoViOfhCOz9KwHj8adBKdofCtZsN/nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=I8yH0S ehHPj+Iur9d7n62VvpYpoBbTRbb97fF+VdTUI=; b=OUtuyvisqKDuk4d0ayHDKO Uqsg07+KjInuCj+qIY8dTKs9Thoj0m0kiuV6Er5m2x/0/A3IKm0Z8mFCmUMHrwnG xgDIFj0vos3w08fc03iYfq4sQC1nCVD7iNu2po8VWsPoRmD3teEsVu5a25rYVhou sW2Q1+/n73Aj6i68xd/xQnDz/8vYhcLLuNh84JCF1xhV8en5BbW8ksTiQZyXFCs1 b3kFvZc1LWLpePSUFhlHllNPhiHfK94e2mnpOCmxu7UErqwYxyIgkIp4qKe9yuTd jexcijaYfD+LS9bUbgeeo0A1XuLV0zhh08ukZixm9hNL5x4uBE5Yup7x7+yq9Naw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 45E4210255; Tue, 3 Jul 2018 23:21:07 -0400 (EDT) Subject: Re: pg_dump out of memory To: Andy Colson , pgsql References: From: Adrian Klaver Message-ID: <1aaeedd9-5c96-f1f2-e6e2-5d314b409565@aklaver.com> Date: Tue, 3 Jul 2018 20:21:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/03/2018 07:43 PM, Andy Colson wrote: > Hi All, > > I moved a physical box to a VM, and set its memory to 1Gig.  Everything > runs fine except one backup: > > > /pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep > > g_dump: Dumping the contents of table "ofrrds" failed: PQgetResult() > failed. > pg_dump: Error message from server: ERROR:  out of memory > DETAIL:  Failed on request of size 1073741823. > pg_dump: The command was: COPY public.ofrrds (id, updateddate, bytes) TO > stdout; > > I've been reducing my memory settings: > > maintenance_work_mem = 80MB > work_mem = 5MB > shared_buffers = 200MB > > But it doesnt seem to make a difference. > The tables looks like: > > wildfire=# \dt+ ofrrds >                    List of relations >  Schema |  Name  | Type  | Owner | Size  | Description > --------+--------+-------+-------+-------+------------- >  public | ofrrds | table | andy  | 15 MB | > > > ildfire=# \d ofrrds >               Table "public.ofrrds" >    Column    |          Type          | Modifiers > -------------+------------------------+----------- >  id          | character varying(100) | not null >  updateddate | bigint                 | not null >  bytes       | bytea                  | > Indexes: >     "ofrrds_pk" PRIMARY KEY, btree (id) > > > wildfire=# select id, length(bytes) from ofrrds; >         id         |  length > -------------------+----------- >  muc_rooms         | 152330241 >  packet_count      |  76165121 >  muc_users         |  76165121 >  sessions          |  76165121 >  muc_occupants     |   9520641 >  muc_traffic       | >  server_bytes      | 301850625 >  proxyTransferRate |  76165121 >  server_sessions   | 152330241 >  conversations     | 304660481 > (10 rows) > > > I'm not sure how to get this backup to run.  Any hints would be > appreciated. Maybe: 1) Try: pg_dump -t ofrrds to dump only that table. 2) If that works then: pg_dump -T ofrrds to dump everything but that table. > > -Andy > > > > -- Adrian Klaver adrian.klaver@aklaver.com