Re: refactoring basebackup.c
От | Robert Haas |
---|---|
Тема | Re: refactoring basebackup.c |
Дата | |
Msg-id | CA+TgmoZbLCO90b9eFb7Vkz1SbLjJ_J9v2ttL0xmOAx=qaD_mtw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: refactoring basebackup.c (Mark Dilger <mark.dilger@enterprisedb.com>) |
Список | pgsql-hackers |
On Wed, Jul 21, 2021 at 12:11 PM Mark Dilger <mark.dilger@enterprisedb.com> wrote: > If you were going to support lots of formats, not just tar, you might want the streamer class for each format to have acallback which sets up the injector, rather than having CreateBackupStreamer do it directly. Even then, having now studiedCreateBackupStreamer a bit more, the idea seems less appealing than it did initially. I don't think it makes thingsany cleaner when only supporting tar, and maybe not even when supporting multiple formats, so I'll withdraw the suggestion. Gotcha. I think if we had a lot of formats I'd probably make a separate function where you passed in the file extension and archive type and it hands you back a parser for the appropriate kind of archive, or something like that. And then maybe a second, similar function where you pass in the injector and archive type and it wraps an archiver of the right type around it and hands that back. But I don't think that's worth doing until we have 2 or 3 formats, which may or may not happen any time in the forseeable future. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: