Skip site navigation (1) Skip section navigation (2)

Re: [QUESTIONS] Re: [HACKERS] text should be a blob field

From: Peter T Mount <psqlhack(at)maidast(dot)demon(dot)co(dot)uk>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andreas(dot)Zeugswetter(at)telecom(dot)at, pgsql-hackers(at)hub(dot)org
Subject: Re: [QUESTIONS] Re: [HACKERS] text should be a blob field
Date: 1998-03-04 20:16:07
Message-ID: Pine.LNX.3.95.980304183934.1762A-100000@maidast (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 4 Mar 1998, Bruce Momjian wrote:

> > 1. Is there a call made by the backend to each datatype when a row is 
> >    deleted? I can't see one.
> Well, you could have a RULE that deletes the large object at row
> deletion time.

As I haven't yet played with Rules & Triggers, and now we have 6.3 out of
the way, I'm going to start.

> However, if two rows point to the same large object, the first one
> deleting it would delete the large object for the other.  The only
> solution to this is to have a separate large object table, and use
> reference counts so only the last user of the object deletes it. 

Ah, in this case, there would be a single large object per column/row. If
the row is deleted, then so will the blob.

> > 2. When we update a row, we don't want the overhead of copying a very
> >    large blob when a row is first copied, then the original deleted, etc.
> Again, a deletion-only rule, but if the update the row and change the
> large object, you would have to delete the old stuff.

That's true.

> Seems very messy to me.  Perhaps put all the large objects in a table,
> and have a process clean up all the unreferenced large objects.

I think that would be a last resort thing to use.

Peter T Mount  petermount(at)earthling(dot)net or pmount(at)maidast(dot)demon(dot)co(dot)uk
Main Homepage:
Work Homepage: Work EMail: peter(at)maidstone(dot)gov(dot)uk

In response to

pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-03-04 21:14:12
Subject: Re: [HACKERS] PostgreSQL - the Linux of Databases...
Previous:From: Ponomarev S.Date: 1998-03-04 19:50:31

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group