Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gN27G-0006PV-CU for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 20:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gN27D-0001sj-3D for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 20:50:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gN27C-0001sV-Nw for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 20:50:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gN27A-0005cd-Ad for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 20:50:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wAEKoBNw012180; Wed, 14 Nov 2018 15:50:11 -0500 From: Tom Lane To: Jean-Marc Lessard cc: Adrien Nayrat , "pgsql-general@lists.postgresql.org" Subject: Re: pg_dump out of memory for large table with LOB In-reply-to: <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811C1EF@SRV-CAMTL-EXCH2.Forensictech.com> References: <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811BCEF@SRV-CAMTL-EXCH2.Forensictech.com> <73d2f4fb-3da4-1c09-8bff-88a35f16bcd2@anayrat.info> <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811C1EF@SRV-CAMTL-EXCH2.Forensictech.com> Comments: In-reply-to Jean-Marc Lessard message dated "Wed, 14 Nov 2018 17:14:07 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12178.1542228611.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 14 Nov 2018 15:50:11 -0500 Message-ID: <12179.1542228611@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jean-Marc Lessard writes: > Would you recommend bytea over LOB considering that the max LOB size is = well bellow 1GB? Yes, probably. The reason that pg_dump has trouble with lots of small BLOBs is the 9.0-era decision to treat BLOBs as independent objects having their own owners, privilege attributes, and archive TOC entries --- it's really the per-BLOB TOC entries that are causing the issue for you here. That model is fine as long as BLOBs are, uh, large. If you're using them as replacements for bytea, the overhead is going to be prohibitive. regards, tom lane