Re: recovery modules

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: recovery modules
Дата
Msg-id Y9hPBxfiN3m8hfs/@paquier.xyz
обсуждение исходный текст
Ответ на Re: recovery modules  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: recovery modules
Список pgsql-hackers
On Mon, Jan 30, 2023 at 12:04:22PM -0800, Nathan Bossart wrote:
> On Mon, Jan 30, 2023 at 11:48:10AM -0800, Andres Freund wrote:
>> I don't think _PG_archive_module_init() should actually allocate a memory
>> context and do other similar initializations. Instead it should just return
>> 'const ArchiveModuleCallbacks*', typically a single line.
>>
>> Allocations etc should happen in one of the callbacks. That way we can
>> actually have multiple instances of a module.
>
> I think we'd need to invent a startup callback for archive modules for this
> to work, but that's easy enough.

If you don't return some (void *) pointing to a private area that
would be stored by the backend, allocated as part of the loading path,
I agree that an extra callback is what makes the most sense,
presumably called around the beginning of PgArchiverMain().  Doing
this kind of one-time action in the file callback woud be weird..
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pub/sub - specifying optional parameters without values.
Следующее
От: Melanie Plageman
Дата:
Сообщение: Re: heapgettup refactoring