Re: Largeobject Access Controls (r2460)

Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>

From: Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>
To: KaiGai Kohei <kaigai@ak.jp.nec.com>
Cc: pgsql-hackers@postgresql.org
Date: 2009-12-11T08:34:11Z
Lists: pgsql-hackers

Attachments

KaiGai Kohei <kaigai@ak.jp.nec.com> wrote:

> >>   We have to reference pg_largeobject_metadata to check whether a certain
> >>   large objct exists, or not.
> It is a case when we create a new large object, but write nothing.

OK, that makes sense.

In addition of the patch, we also need to fix pg_restore with
--clean option. I added DropBlobIfExists() in pg_backup_db.c.

A revised patch attached. Please check further mistakes.


BTW, we can optimize lo_truncate because we allow metadata-only large
objects. inv_truncate() doesn't have to update the first data tuple to
be zero length. It only has to delete all corresponding tuples like as:
    DELETE FROM pg_largeobject WHERE loid = {obj_desc->id}

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