Re: multi-install PostgresNode fails with older postgres versions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: multi-install PostgresNode fails with older postgres versions
Дата
Msg-id 20210407165155.GA9895@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: multi-install PostgresNode fails with older postgres versions  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Ответы Re: multi-install PostgresNode fails with older postgres versions
Список pgsql-hackers
On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote:

> When I'm creating a new node, I'm using the "pgaTester" factory class. It
> relies on PATH to check the major version using pg_config, then loads the
> appropriate class.

From a code cleanliness point of view, I agree that having separate
classes for each version is neater than what you call a forest of
conditionals.  I'm not sure I like the way you instantiate the classes
in pgaTester though -- wouldn't it be saner to have PostgresNode::new
itself be in charge of deciding which class to bless the object as?
Since we're talking about modifying PostgresNode itself in order to
support this, it would make sense to do that.

(I understand that one of your decisions was to avoid modifying
PostgresNode, so that you could ingest whatever came out of PGDG without
having to patch it each time.)

-- 
Álvaro Herrera       Valdivia, Chile



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Need help!
Следующее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: why pg_walfile_name() cannot be executed during recovery?