Home Explore Blog CI



postgresql

43th chunk of `doc/src/sgml/installation.sgml`
10f90e8d12de21257cccd49fd2af343f8bff140a8da868990000000100000fa0
 default.  See
        <xref linkend="xfunc-addin-injection-points"/> for more details.  This
        option is intended to be used only by developers for testing.
       </para>
      </listitem>
     </varlistentry>

      <varlistentry id="configure-segsize-blocks-meson">
       <term><option>-Dsegsize_blocks=SEGSIZE_BLOCKS</option></term>
       <listitem>
        <para>
         Specify the relation segment size in blocks. If both
         <option>-Dsegsize</option> and this option are specified, this option
         wins.

         This option is only for developers, to test segment related code.
        </para>
       </listitem>
      </varlistentry>

    </variablelist>
   </sect3>
  </sect2>

  <sect2 id="targets-meson">
   <title><literal>meson</literal> Build Targets</title>

   <para>
    Individual build targets can be built using <command>ninja</command> <replaceable>target</replaceable>.

    When no target is specified, everything except documentation is
    built. Individual build products can be built using the path/filename as
    <replaceable>target</replaceable>.
   </para>

   &targets-meson;
  </sect2>

 </sect1>

 <sect1 id="install-post">
  <title>Post-Installation Setup</title>

  <sect2 id="install-post-shlibs">
   <title>Shared Libraries</title>

   <indexterm>
    <primary>shared library</primary>
   </indexterm>

   <para>
    On some systems with shared libraries
    you need to tell the system how to find the newly installed
    shared libraries.  The systems on which this is
    <emphasis>not</emphasis> necessary include
    <systemitem class="osname">FreeBSD</systemitem>,
    <systemitem class="osname">Linux</systemitem>,
    <systemitem class="osname">NetBSD</systemitem>, <systemitem
    class="osname">OpenBSD</systemitem>, and
    <systemitem class="osname">Solaris</systemitem>.
   </para>

   <para>
    The method to set the shared library search path varies between
    platforms, but the most widely-used method is to set the
    environment variable <envar>LD_LIBRARY_PATH</envar> like so: In Bourne
    shells (<command>sh</command>, <command>ksh</command>, <command>bash</command>, <command>zsh</command>):
<programlisting>
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
</programlisting>
    or in <command>csh</command> or <command>tcsh</command>:
<programlisting>
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
</programlisting>
    Replace <literal>/usr/local/pgsql/lib</literal> with whatever you set
    <option><literal>--libdir</literal></option> to in <xref linkend="configure"/>.
    You should put these commands into a shell start-up file such as
    <filename>/etc/profile</filename> or <filename>~/.bash_profile</filename>.  Some
    good information about the caveats associated with this method can
    be found at <ulink
    url="http://xahlee.info/UnixResource_dir/_/ldpath.html"></ulink>.
   </para>

   <para>
    On some systems it might be preferable to set the environment
    variable <envar>LD_RUN_PATH</envar> <emphasis>before</emphasis>
    building.
   </para>

   <para>
    On <systemitem class="osname">Cygwin</systemitem>, put the library
    directory in the <envar>PATH</envar> or move the
    <filename>.dll</filename> files into the <filename>bin</filename>
    directory.
   </para>

   <para>
    If in doubt, refer to the manual pages of your system (perhaps
    <command>ld.so</command> or <command>rld</command>). If you later
    get a message like:
<screen>
psql: error in loading shared libraries
libpq.so.2.1: cannot open shared object file: No such file or directory
</screen>
    then this step was necessary.  Simply take care of it then.
   </para>

   <para>
    <indexterm>
     <primary>ldconfig</primary>
    </indexterm>
    If you are on <systemitem class="osname">Linux</systemitem> and you have root
    access, you can run:
<programlisting>
/sbin/ldconfig /usr/local/pgsql/lib
</programlisting>
    (or equivalent directory) after installation to enable the

Title: Post-Installation Setup for Shared Libraries
Summary
After installing PostgreSQL, some systems require configuration to find the newly installed shared libraries, which can be done by setting environment variables such as LD_LIBRARY_PATH or LD_RUN_PATH, or by running commands like ldconfig on Linux systems.