Re: Schema version management

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: Schema version management
Дата
Msg-id CAASwCXcO7qnyAS0FPiww0xsWDizaiY5XexRVNtS41TOVouePHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Schema version management  (Daniel Farina <daniel@heroku.com>)
Ответы Re: Schema version management  (Andrew Dunstan <andrew@dunslane.net>)
Re: Schema version management  (Daniel Farina <daniel@heroku.com>)
Список pgsql-hackers
On Tue, May 22, 2012 at 3:30 AM, Daniel Farina <daniel@heroku.com> wrote:
> Thank you, that's very informative.  I'd like to reiterate one
> question, though, which is something like:
>
> "How do you feel that the since-committed directory-output/input
> support in pg_dump/pg_restore could or should influence your patch, if
> at all?"

The directory format fulfills a different purpose. The tables are
split into files, where each file name gets a number. Functions are
not split into files, they are defined in the table of content file,
toc.dat.

Example:

joel@Joel-Jacobsons-MacBook-Pro ~ $ pg_dump -F d -f /Users/joel/test
joel@Joel-Jacobsons-MacBook-Pro ~ $ ls -la test
total 24
drwx------    5 joel  staff   170 May 22 07:16 .
drwx------+ 130 joel  staff  4488 May 22 07:16 ..
-rw-r--r--    1 joel  staff    38 May 22 07:16 2116.dat.gz
-rw-r--r--    1 joel  staff    39 May 22 07:16 2117.dat.gz
-rw-r--r--    1 joel  staff  2265 May 22 07:16 toc.dat

This is a good feature for its purpose, but doesn't provide a solution
for the schema version management problem.

> It seems like now that there is support for spitting out a bunch of
> files in a directory for pg_dump that is now going to be supported for
> a long time that a new feature like yours might be more cohesive if it
> somehow played with that.  I must confess I haven't read the patch in
> detail, especially if it has been updated, but back then there was no
> multi-file output mode from pg_dump, and now there is one.  My naive
> understanding is this would be adding a second one as-is, but I wonder
> if that is strictly necessary to fulfill the use case.

If one want to reuse the splitting to files-code of the directory
format, maybe the existing option -F d could be tweaked to output in
both a a machine-readable format (current way), and also a
human-friendly tree of files and content (like suggested by my patch).

I wonder what the option would be called then, having two chars
options is not an option I guess, maybe -F t for "tree" instead of
"directory", as the -F d option only dumps to a single directory and
not a tree-structure?


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ants Aasma
Дата:
Сообщение: Re: Why is indexonlyscan so darned slow?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Schema version management