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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?
Дата
Msg-id CALj2ACXcedBdnBZ3TFY8PBNf60EZ3=gTK0Zrn5bKpSTmh57M7Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
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?

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: pg_get_publication_tables() output duplicate relid
Следующее
От: Yugo NAGATA
Дата:
Сообщение: Re: Commitfest 2021-11 Patch Triage - Part 1