Re: Weight BLOB objects in postgreSQL? How?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: María Dovale *EXTERN* <m(dot)dovale(at)griensu(dot)com>, "John R Pierce" <pierce(at)hogranch(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Weight BLOB objects in postgreSQL? How?
Date: 2015-03-09 10:15:22
Message-ID: A737B7A37273E048B164557ADEF4A58B365A4789@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

María Dovale wrote:
> Thanks, I mean, how heavy it is in kB.

You can use lo_lseek64 to find out how big a large object is.
To find out the size of large object 24858, you can

SELECT lo_lseek64(lo_open(24858, 262144), 0, 2);

The last "2" here is SEEK_END from /usr/include/unistd.h, so it may be
that this value is different for different operating systems.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message pinker 2015-03-09 11:22:56 Re: VACUUM FULL doesn't reduce table size
Previous Message wambacher 2015-03-09 08:57:52 Re: autovacuum worker running amok - and me too ;)