Re: Auto-delete large objects when referencing row is deleted - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: Auto-delete large objects when referencing row is deleted
Date
Msg-id 20090408130431.8FCB.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Auto-delete large objects when referencing row is deleted  (higepon <higepon@gmail.com>)
Responses Re: Auto-delete large objects when referencing row is deleted  (higepon <higepon@gmail.com>)
List pgsql-hackers
higepon <higepon@gmail.com> wrote:

> As a user of database, I think contrib/lo is not the best way.
> Because it's not a part of core PostgreSQL, users may forget to use them.
> Or it is a little messy to use.
> So I think we need to implement *Auto* delete functionality in PostgreSQL core.

(It would be a rare case, but) A large object might be referenced
by two or more rows because LO interface is split into two steps;
allocating oid and storing data for it. The oid could be stored in
two or more places and auto deletion would break such usecases.

BTW, bytea and TOASTing would works perfectly as you expected.
Why don't you use bytea instead of large objects? In other words,
what you want actually is not LO improvement but efficient TOASTing, no?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: another tiny fix (tab-completion) for \ef in psql
Next
From: Tom Lane
Date:
Subject: Re: Closing some 8.4 open items