Re: Largeobject Access Controls (r2460) - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: Largeobject Access Controls (r2460)
Date
Msg-id 20100121165225.D19A.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Largeobject Access Controls (r2460)  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Responses Re: Largeobject Access Controls (r2460)  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
List pgsql-hackers
KaiGai Kohei <kaigai@ak.jp.nec.com> wrote:

> This patch renamed the hasBlobs() by getBlobs(), and changed its
> purpose. It registers DO_BLOBS, DO_BLOB_COMMENTS and DO_BLOB_ACLS
> for each large objects owners, if necessary.

This patch adds DumpableObjectType DO_BLOB_ACLS and struct BlobsInfo. We
use three BlobsInfo objects for DO_BLOBS, DO_BLOB_COMMENTS, and DO_BLOB_ACLS
_for each distinct owners_ of large objects. So, even if we have many large
objects in the database, we just keep at most (3 * num-of-roles) BlobsInfo
in memory. For older versions of server, we assume that blobs are owned by
only one user with an empty name. We have no BlobsInfo if no large objects.


I'm not sure whether we need to make groups for each owner of large objects.
If I remember right, the primary issue was separating routines for dump
BLOB ACLS from routines for BLOB COMMENTS, right? Why did you make the change?


Another concern is their confusable identifier names -- getBlobs()
returns BlobsInfo for each owners. Could we rename them something
like getBlobOwners() and BlobOwnerInfo?

Also, DumpableObject.name is not used in BlobsInfo. We could reuse
DumpableObject.name instead of the "rolname" field in BlobsInfo.

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




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: is any reason why we cannot cast from record (row) to typed row?
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: lock_timeout GUC patch