From: | Joel Jacobson <joel(at)gluefinance(dot)com> |
---|---|
To: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pg_dump --split patch |
Date: | 2010-12-28 19:39:01 |
Message-ID: | AANLkTimijFkHGL2QJEQ1eroiZCXLejFfu2yWMMTEK6Ac@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/12/28 Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
> I would suggest the directory structure as:
>
> /crypt/pg.dump-split/schema-name-1/VIEWS/view-name-1.sql
> /crypt/pg.dump-split/schema-name-1/TABLES/table-name-1.sql
> ...
> /crypt/pg.dump-split/schema-name-2/VIEWS/view-name-1.sql
> /crypt/pg.dump-split/schema-name-2/TABLES/table-name-1.sql
>
> This might n be more amenable to diff'ing the different dumps. Schemas are
> logical grouping of other objects and hence making that apparent in your
> dump's hierarchy makes more sense.
>
Thanks Gurjeet and Tom for good feedback!
I've made some changes and attached new patches.
Looks much better now I think!
This is what I've changed,
*) Not using oid anymore in the filename
*) New filename/path structure: [-f
filename]-split/[schema]/[desc]/[tag].sql
*) If two objects share the same name tag for the same [schema]/[desc], -2,
-3, etc is appended to the name. Example:
~/pg.dump-split/public/FUNCTION/foobar.sql
~/pg.dump-split/public/FUNCTION/foobar-2.sql
~/pg.dump-split/public/FUNCTION/barfoo.sql
~/pg.dump-split/public/FUNCTION/barfoo-2.sql
~/pg.dump-split/public/FUNCTION/barfoo-3.sql
I think you are right about functions (and aggregates) being the only
desc-type where two objects can share the same name in the same schema.
This means the problem of dumping objects in different order is a very
limited problem, only affecting overloaded functions.
I didn't include the arguments in the file name, as it would lead to very
long file names unless truncated, and since the problem is very limited, I
think we shouldn't include it. It's cleaner with just the name part of the
tag in the file name.
--
Best regards,
Joel Jacobson
Glue Finance
Attachment | Content-Type | Size |
---|---|---|
pg-dump-split-plain-text-files-8.4.6.patch | application/octet-stream | 6.1 KB |
pg-dump-split-plain-text-files-9.1devel.patch | application/octet-stream | 5.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2010-12-28 20:04:38 | Re: "writable CTEs" |
Previous Message | Kevin Grittner | 2010-12-28 19:22:44 | SLRU overview |