Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZeQkG-0003GL-BN for pgsql-admin@arkaria.postgresql.org; Tue, 22 Sep 2015 16:48:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZeQkF-000593-DR for pgsql-admin@arkaria.postgresql.org; Tue, 22 Sep 2015 16:48:43 +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) (envelope-from ) id 1ZeQiZ-0003Iw-Th for pgsql-admin@postgresql.org; Tue, 22 Sep 2015 16:47:00 +0000 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZeQiW-0007om-NM for pgsql-admin@postgresql.org; Tue, 22 Sep 2015 16:46:59 +0000 Received: by oiww128 with SMTP id w128so8835667oiw.2 for ; Tue, 22 Sep 2015 09:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bYiRuZXXY+sVhfFhe6ysLEBKxjJrNGCL8gVBCoQUClw=; b=lsNEN9kgdEEp4F0BaKoeY9wqOTaXzGM3q0/Yeuc/60tCM+4fc9dYvXged43hEStNhR rwKIOMPi6c/RI7d9MIeOTk4pxOQRkhvyD+HjlQJxRxypO/XcHdLPIEnEhCs2GpJPqV0X CmuATUe85PyAl4mP/45WrB9n2FrY+w952Ub2jGhCWRfMXLCLpJ4KtNa4/TXnpHSIjLSt rBk9RaUkvjTh/cpGPDtJuVd5zI7rVhXSceHddbc6N7zlnG+if8XGrpmnJcHh6ZJqLBOF y5SK1pVMSKtRyXsHSEV1gAeGqScpCPCttEWauqKQPTgITramQDPwWjzIrONuxj5I6UQr AdGw== MIME-Version: 1.0 X-Received: by 10.202.80.83 with SMTP id e80mr15253132oib.51.1442940414884; Tue, 22 Sep 2015 09:46:54 -0700 (PDT) Received: by 10.202.80.133 with HTTP; Tue, 22 Sep 2015 09:46:54 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 Sep 2015 22:16:54 +0530 Message-ID: Subject: Re: Need to calculate total size of a table along with BLOB data assosciated with it. From: girish R G peetle To: Albe Laurenz Cc: pgsql-admin Content-Type: multipart/alternative; boundary=001a113b1a0adc82d3052058beb4 X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --001a113b1a0adc82d3052058beb4 Content-Type: text/plain; charset=UTF-8 Thanks Laurenz and Guillaume, got clarity on how it works. Ran few tests and you are right, size restriction applies for pg_catalog.pg_largeobject(as it is the common place where BLOB data is stored) in case of TAR format. On Mon, Sep 21, 2015 at 2:47 PM, Albe Laurenz wrote: > girish R G peetle wrote: > > Got it. Thanks Laurenz. > > One thing is little confusing, if large objects don't belong to a table, > then how does restriction of > > 8GB table size for TAR format is applicable if BLOB data is involved. > > Is it (Regular Table Data size) + (BLOB data held by OID stored in the > table) ? > > What is the command you use to dump table + large objects? > > I guess that the large objects make up more than 8 GB and are dumped as a > single file. 8 GB is the size limit of a single file in a TAR archive. > > > If just OID of a large object is copied to a different table say > 'Table2'. Then for 'Table2' as well > > should I calculate the total size as (Regular Table Data size) + (BLOB > data held by OID stored in the > > table) ? > > That's exactly the problem: large objects don't technically belong to the > table > which references them. If you reference a large object from more than one > table, there's no good way of defining to which it belongs. > > But that's irrelevant to the problem of files in a dump exceeding the > limit of 8 GB, > isn't it? If you sump with the --blobs option, all large objects in the > whole database > will be dumped, no matter if they are referenced from a table or not. > > Yours, > Laurenz Albe > --001a113b1a0adc82d3052058beb4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Laurenz and Guillaume, got clarity on how it works.= =C2=A0
Ran few tests and you are right, size restriction applies for p= g_catalog.pg_largeobject(as it is the common place where BLOB data is store= d) in case of TAR format.

On Mon, Sep 21, 2015 at 2:47 PM, Albe Laurenz <l= aurenz.albe@wien.gv.at> wrote:
girish R G peetle wrote:
> Got it. Thanks Laurenz.
> One thing is little confusing, if large objects don't belong to a = table, then how does restriction of
> 8GB table size for TAR format is applicable if BLOB data is involved.<= br> > Is it=C2=A0 (Regular Table Data size) + (BLOB data held by OID stored = in the table) ?

What is the command you use to dump table + large objects?

I guess that the large objects make up more than 8 GB and are dumped as a single file.=C2=A0 8 GB is the size limit of a single file in a TAR archive= .

> If just OID of a large object is copied to a different table say '= Table2'. Then for 'Table2' as well
> should I calculate the total size as (Regular Table Data size) + (BLOB= data held by OID stored in the
> table) ?

That's exactly the problem: large objects don't technically = belong to the table
which references them.=C2=A0 If you reference a large object from more than= one
table, there's no good way of defining to which it belongs.

But that's irrelevant to the problem of files in a dump exceeding the l= imit of 8 GB,
isn't it?=C2=A0 If you sump with the --blobs option, all large objects = in the whole database
will be dumped, no matter if they are referenced from a table or not.

Yours,
Laurenz Albe

--001a113b1a0adc82d3052058beb4--