Verified Commit ad75c4ba authored by Christoph Berg's avatar Christoph Berg 📡 Committed by Paul Gevers
Browse files

Existing PostgreSQL databases need to be reindexed

Closes: #926627
parent 360998b4
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -356,6 +356,34 @@ information mentioned in <xref linkend="morereading"/>.
    </para>
  </section>

  <section id="postgresql-reindex">
    <!-- stretch to buster-->
    <title>Existing PostgreSQL databases need to be reindexed</title>
    <para>
      When upgrading from stretch to buster, the glibc locale data is upgraded.
      Specifically, this changes how PostgreSQL sorts data in text indexes.
      To avoid corruption, such indexes need to be <literal>REINDEX</literal>ed
      immediately after upgrading the <literal>locales</literal> or
      <literal>locales-all</literal> packages, before putting back the database
      into production.
    </para>
    <para>
      Suggested command: <literal>sudo -u postgres reindexdb --all</literal>
    </para>
    <para>
      Alternatively, upgrade the databases to PostgreSQL 11 using
      <literal>pg_upgradecluster</literal>.
      (This uses <literal>pg_dump</literal> by default which will rebuild all
      indexes. Using <literal>-m upgrade</literal> or <literal>pg_upgrade</literal>
      is <emphasis>not</emphasis> safe because it preserves the now-wrong
      index ordering.)
    </para>
    <para>
      Refer to the <ulink url="https://wiki.postgresql.org/wiki/Locale_data_changes">PostgreSQL Wiki</ulink>
      for more information.
    </para>
  </section>

</section>

</chapter>
+5 −0
Original line number Diff line number Diff line
@@ -126,6 +126,11 @@
      <surname>Perrier</surname>
      <contrib>bubulle, Lenny installation</contrib>
    </author>,
    <author>
      <firstname>Christoph</firstname>
      <surname>Berg</surname>
      <contrib>PostgreSQL-specific issues</contrib>
    </author>,
    <author>
      <firstname>Daniel</firstname>
      <surname>Baumann</surname>