Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?
Дата
Msg-id CALj2ACWr6u6pZpHq-NqnYPK8NgXaxTOWsNnmfDxFT=OXrQ_vPg@mail.gmail.com
обсуждение исходный текст
Ответ на Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Wed, Dec 1, 2021 at 12:31 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> Hi,
>
> I recently did a small experiment to see how one can create extensions
> properly in HA(primary-standby) setup.
>
> Here are my findings:
> 1) ALTER SYSTEM SET or GUC(configuration parameters) settings are not
> replicated to standby.
> 2) CREATE EXTENSION statements are replicated to standby.
> 3) If the extension doesn't need to be set up in
> shared_preload_libraries GUC, no need to create extension on the
> standby, it just works.
> 4) If the extension needs to be set up in shared_preload_libraries
> GUC: the correct way to install the extension on both primary and
> standby is:
>     a) set shared_preload_libraries GUC on primary, reload conf,
> restart the primary to make the GUC effective.
>     b) set shared_preload_libraries GUC on standby, restart the
> standby to make the GUC effective.
>     c) create extension on primary (we don't need to create extension
> on standby as the create extension statements are replicated).
>     d) verify that the extension functions work on both primary and standby.
> 5) The extensions which perform writes to the database may not work on
> standby as the write transactions are not allowed on the standby.
> However, the create extension on the standby works just fine but the
> functions it provides may not work.
>
> I think I was successful in my experiment, please let me know if
> anything is wrong in what I did.
>
> Do we have the documentation on how to create extensions correctly in
> HA setup? If what I did is correct and we don't have it documented,
> can we have it somewhere in the existing HA related documentation?

I'm thinking of adding the above steps into the "Additional Supplied
Modules" section documentation. Any thoughts please?

[1] - https://www.postgresql.org/docs/devel/contrib.html

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: should we document an example to set multiple libraries in shared_preload_libraries?
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints