Forum OpenACS Q&A: Response to PostgreSQL Large Object functionality

Collapse
Posted by Don Baccus on
Titus ... your driver hack, along with my BLOB hack that was designed expressly for the ACS, are both dead-ends I'm afraid.  My hack ended up in the main AOLserver release of the Postgres driver, but if it hadn't I wouldn't've minded (and it's conditionalized with #ifdef ACS directives).  When 7.1 large types come out (see below) we'll modify the ACS to use them, and I'll rip my temporary hack out of the Postgres driver.  Because I knew it was a temporary hack to get us up and running, and no more, I only implemented the two elements of BLOB functionality currently used by the ACS and didn't bother to generalize the interface.

So I'd recommend against including your interface to existing PG large  objects.

They're both a dead-end because Postgres V7.1 will have true large types that will automatically be mapped to segmented tables (ala the current LO type, but efficiently rather than stupidly) when they're large enough.  These types can optionally be compressed, too.

If I get time to dig more deeply into Postgres internals this summer or fall, I plan to layer SQL92-compliant BLOBs on top of this new implementation of large types, for compatibility reasons (the native PG types will be far more useful for folks not worried about portability).

Unlike the current large object implementation, the new large types will be dumpable and restorable (I'll make sure of that).

Current large objects suffer from a terrible problem, they needlessly use the OID as the key for each object.  This is the main reason you can't dump/restore the things.  Someone recently wrote a hack that allows dumping, non-synch'd with the rest of your database.  As far as I'm concerned, though, if you need to knock down all of your users to make a consistent backup you might as well punt and just tar the database directory (after knocking down the postmaster).

You are doing something like this to make your backups, I hope?  I.E. you realize they're not dumpable/restorable and that you gotta knock down your postmaster before you backup the database from the filesystem?