On Thu, Jul 29, 2021 at 08:39:32AM -0700, David G. Johnston wrote:
> On Thu, Jul 29, 2021 at 8:36 AM Dave Cramer <davecra...@gmail.com> wrote:
> 
> 
> 
> 
>         I have an issue with the fragment "whether they are from contrib" - my
>         understanding at this point is that because of the way we package and
>         version contrib it should not be necessary to copy those shared object
>         files from the old to the new server (maybe, just maybe, with a
>         qualification that you are upgrading between two versions that were in
>         support during the same time period).
> 
> 
>     Just to clarify. In no case are binaries copied from the old server to the
>     new server. Whether from contrib or otherwise.
>
> I had used "binaries" when I should have written "shared object files".  I 
> just
> imagine a DLL as being a binary file so it seems accurate but we use the term
> differently I suppose?

Uh, technically, the _executable_ binary should only use shared object /
loadable libraries that were compiled against that binary's exported
API.  Sometimes mismatches work (if the API used by the shared object
has not changed in the binary) so people get used to it working, and
then one day it doesn't, but it is never a safe process.

If two people here are confused about this, obviously others will be as
well.  I think we were trying to do too much in that first sentence, so
I split it into two in the attached patch.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index a83c63cd98..7352936a94 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -299,15 +299,18 @@ make prefix=/usr/local/pgsql.new install
    </step>
 
    <step>
-    <title>Install custom shared object files</title>
+    <title>Install extension shared object files</title>
 
     <para>
-     Install any custom shared object files (or DLLs) used by the old cluster
-     into the new cluster, e.g., <filename>pgcrypto.so</filename>,
-     whether they are from <filename>contrib</filename>
-     or some other source. Do not install the schema definitions, e.g.,
-     <command>CREATE EXTENSION pgcrypto</command>, because these will be upgraded
-     from the old cluster.
+     If the old cluster used extensions, whether from
+     <filename>contrib</filename> or some other source, it used
+     shared object files (or DLLs) to implement these extensions, e.g.,
+     <filename>pgcrypto.so</filename>.  Now, shared object files matching
+     the new server binary must be installed in the new cluster, usually
+     via operating system commands.  Do not load the schema definitions,
+     e.g., <command>CREATE EXTENSION pgcrypto</command>, because these
+     will be recreated from the old cluster.  (The extensions may be
+     upgraded later using <literal>ALTER EXTENSION ... UPGRADE</literal>.)
      Also, any custom full text search files (dictionary, synonym,
      thesaurus, stop words) must also be copied to the new cluster.
     </para>
@@ -494,10 +497,10 @@ pg_upgrade.exe
      </step>
 
      <step>
-      <title>Install custom shared object files</title>
+      <title>Install extension shared object files</title>
 
       <para>
-       Install the same custom shared object files on the new standbys
+       Install the same extension shared object files on the new standbys
        that you installed in the new primary cluster.
       </para>
      </step>

Reply via email to