Re: Auto-delete large objects when referencing row is deleted

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: higepon <higepon(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Auto-delete large objects when referencing row is deleted
Date: 2009-04-08 04:15:41
Message-ID: 20090408130431.8FCB.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


higepon <higepon(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-08 05:17:25 Re: Closing some 8.4 open items
Previous Message Bruce Momjian 2009-04-08 04:05:33 Re: another tiny fix (tab-completion) for \ef in psql