Re: [INTERFACES] large object error

From: "Cary B(dot) O'Brien" <cobrien(at)access(dot)digex(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] large object error
Date: 1998-10-26 12:41:12
Message-ID: 199810261241.HAA10837@access1.digex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Peter wrote...

> Hi All! :-)
>
> Thanks for your help! :-) I am attempting to write an app
> that uses large objects. It is an offline Usenet NNTP news
> reader that stores all of the message information in a
> postgres database. I am using the LOBS to hold the

You might want to investigate the disk space usage of large objects
and postgresql. My quick investigation indicated that each large
object took up at least one 16k file. In addition, all the files were
in the same directory.

The downside is wasted disk space for articles and (if you end up with
lots and lots of articles in the same database) slow directory
look-ups.

You may want to store the articles in plain disk files, with a hashed
directory structure. You could use a sequence or the oid as a
key. I.E. article 12345678 goes in file 12/34/56/78. I have done this
before with other databases. It also lets you spread things out
over multiple file systems.

Note:

1) This was the result of about an hour's worth of testing.

2) It might not be applicable in your situation. For example,
BLOBS might still be a very good idea if your clients are
coming in over TCP/IP and don't have file system access.

3) It ought to work.

Comments?

[big snip]

--- cary

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gus Nwosu 1998-10-26 14:29:12 Re: [INTERFACES] PgConnection
Previous Message Peter T Mount 1998-10-26 06:54:23 Re: [INTERFACES] large object error