Re: [INTERFACES] large object error - Mailing list pgsql-interfaces

From Cary B. O'Brien
Subject Re: [INTERFACES] large object error
Date
Msg-id 199810261241.HAA10837@access1.digex.net
Whole thread Raw
List 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

pgsql-interfaces by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [INTERFACES] large object error
Next
From: Gus Nwosu
Date:
Subject: Re: [INTERFACES] PgConnection