pg_upgrade.sgml

来自「关系型数据库 Postgresql 6.5.2」· SGML 代码 · 共 129 行

SGML
129
字号
<refentry id="APP-PG-UPGRADE"> <refmeta>  <refentrytitle>   <application>pg_upgrade</application>  </refentrytitle>  <refmiscinfo>Application</refmiscinfo> </refmeta> <refnamediv>  <refname>   <application>pg_upgrade</application>  </refname>  <refpurpose>   Allows upgrade from a previous release without reloading data  </refpurpose> <refsynopsisdiv>  <refsynopsisdivinfo>   <date>1998-10-04</date>  </refsynopsisdivinfo>  <synopsis>pg_upgradepg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replaceable class="parameter">old_data_dir</replaceable>  </synopsis> </refsynopsisdiv> <refsect1 id="R1-APP-PG-UPGRADE-1">  <refsect1info>   <date>1998-10-04</date>  </refsect1info>  <title>   Description  </title>  <para>   <application>pg_upgrade</application>   is a utility for upgrading from a previous   PostgreSQL release without reloading all the data.  <procedure>   <title>Upgrading <productname>Postgres</productname></title>   <step performance="required">    <para>     Back up your data directory.    </para>   </step>   <step performance="required">    <para>     Use:     <programlisting>% pg_dumpall -s >db.out     </programlisting>     to dump out your old  database definitions without any     data.  Stop the postmaster and all backends.    </para>   </step>   <step performance="required">    <para>     Rename  (using mv) your old pgsql <filename>data/</filename> directory to     <filename>data.old/</filename>.    </para>   </step>   <step performance="required">    <para>     Do a     <command>make install</command> to install the new binaries.    </para>   </step>   <step performance="required">    <para>     Run <application>initdb</application> to create a new template1 database containing the system     tables for the new release.    </para>   </step>   <step performance="required">    <para>     Start the new postmaster.    </para>   </step>   <step performance="required">    <para>     Change your working directory to the      pgsql main directory, and type:     <programlisting>% pg_upgrade -f db.out data.old     </programlisting>     The  system  will do some checking to make sure everything     is properly configured, and will run your db.out script to create     all the  databases and  tables you had, but with no     data.  It will then move the  data  files  from <filename>data.old/</filename>     into  the  proper <filename>data/</filename> directory.    </para>   </step>   <step performance="required">    <para>     <emphasis>Carefully</emphasis> examine the contents of the upgraded database.    </para>   </step>   <step performance="required">    <para>     You can delete the <filename>data.old/</filename> directory when you     are finished.    </para> </refsect1></refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:nilsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tsgml-parent-document:nilsgml-default-dtd-file:"../reference.ced"sgml-exposed-tags:nilsgml-local-catalogs:"/usr/lib/sgml/catalog"sgml-local-ecat-files:nilEnd:-->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?