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

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?
Date: 2022-02-11 04:46:27
Message-ID: CALj2ACVfFyeYu6Qg1MN9OW_bMsLr5XMFAymTc59rhPSkwHixUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 18, 2022 at 1:26 PM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
>
> Hi,
>
> On Thu, Dec 09, 2021 at 08:19:06AM +0530, Bharath Rupireddy wrote:
> >
> > Thanks. Attaching v1 patch specifying the notes there. Please review.
>
> I think that the common terminology is "module", not "extension". That's
> especially important here as this information is also relevant for modules that
> may come with an SQL level extension. This should be made clear in that new
> documentation, same for the CREATE EXTENSION part that may not be relevant.

Thanks for reviewing this. The aim of the patch is to add how one can
create extensions with "CREATE EXTENSION" command in replication
setup, not sure why I should use the term "module". I hope you have
seen the usage of extension in the extend.sgml.

> It also seems that this documentation is only aimed for physical replication.
> It should also be explicitly stated as it might not be obvious for the intended
> readers.

Yeah, I've changed the title and description accordingly.

> + [...] set it either via <link linkend="sql-altersystem">ALTER SYSTEM</link>
> + command or <filename>postgresql.conf</filename> file on both primary and
> + standys, reload the <filename>postgresql.conf</filename> file and restart
> + the servers.
>
> Isn't the reload a terrible advice? By definition changing
> shared_preload_libraries isn't compatible with a simple reload and will emit
> some error.

Yes, it will emit the following messages. I removed the reload part.

2022-02-11 04:07:53.178 UTC [1206594] LOG: parameter
"shared_preload_libraries" cannot be changed without restarting the
server
2022-02-11 04:07:53.178 UTC [1206594] LOG: configuration file
"/home/bharath/postgres/inst/bin/data/postgresql.auto.conf" contains
errors; unaffected changes were applied

> + [...] Create the extension on the primary, there is no need to
> + create it on the standbys as the <link linkend="sql-createextension"><command>CREATE EXTENSION</command></link>
> + command is replicated.
>
> The "no need" here is quite ambiguous, as it seems to indicate that trying to
> create the extension on the standby will work but is unnecessary.

Modified.

Attaching v2, please have a look.

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v2-0001-Document-creating-an-extension-in-replication-set.patch application/octet-stream 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-02-11 05:03:07 Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?
Previous Message Andrey V. Lepikhov 2022-02-11 04:29:38 Re: Merging statistics from children instead of re-sampling everything