(2009/12/19 12:05), Robert Haas wrote:
> On Fri, Dec 18, 2009 at 9:48 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>>> Oh. This is more complicated than it appeared on the surface. It
>>> seems that the string "BLOB COMMENTS" actually gets inserted into
>>> custom dumps somewhere, so I'm not sure whether we can just change it.
>>> Was this issue discussed at some point before this was committed?
>>> Changing it would seem to require inserting some backward
>>> compatibility code here. Another option would be to add a separate
>>> section for "BLOB METADATA", and leave "BLOB COMMENTS" alone. Can
>>> anyone comment on what the Right Thing To Do is here?
>> The BLOB COMMENTS label is, or was, correct for what it contained.
>> If this patch has usurped it to contain other things
> It has.
>> I would argue
>> that that is seriously wrong. pg_dump already has a clear notion
>> of how to handle ACLs for objects. ACLs for blobs ought to be
>> made to fit into that structure, not dumped in some random place
>> because that saved a few lines of code.
> OK. Hopefully KaiGai or Takahiro can suggest a fix.
Currently, BLOBS (and BLOB COMMENTS) section does not contain
owner of the large objects, because it may press the local memory
of pg_dump when the database contains massive amount of large
I believe it is the reason why we dump all the large objects in
a single section. Correct?
I don't think it is reasonable to dump all the large object with
its individual section.
However, we can categorize them per owner. In generally, we can
assume the number of database users are smaller than the number
of large objects.
In other word, we can obtain the number of sections to be dumped
as result of the following query:
SELECT DISTINCT lomowner FROM pg_largeobject_metadata;
Then, we can dump them per users.
For earlier versions, all the large objects will be dumped in
a single section with anonymous user.
What's your opinion?
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
In response to
pgsql-hackers by date
|Next:||From: Robert Haas||Date: 2009-12-21 01:23:39|
|Subject: Re: Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts|
|Previous:||From: John Naylor||Date: 2009-12-21 00:20:53|
|Subject: Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts|