pgupgrade.sgml 22.7 KB
Newer Older
1
<!-- doc/src/sgml/pgupgrade.sgml -->
2

3 4 5 6 7 8 9 10 11 12 13
<refentry id="pgupgrade">
 <refmeta>
  <refentrytitle><application>pg_upgrade</application></refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pg_upgrade</refname>
  <refpurpose>upgrade a <productname>PostgreSQL</productname> server instance</refpurpose>
 </refnamediv>
14 15 16 17 18

 <indexterm zone="pgupgrade">
  <primary>pg_upgrade</primary>
 </indexterm>

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_upgrade</command>
   <arg choice="plain"><option>-b</option></arg>
   <arg choice="plain"><replaceable>oldbindir</replaceable></arg>
   <arg choice="plain"><option>-B</option></arg>
   <arg choice="plain"><replaceable>newbindir</replaceable></arg>
   <arg choice="plain"><option>-d</option></arg>
   <arg choice="plain"><replaceable>olddatadir</replaceable></arg>
   <arg choice="plain"><option>-D</option></arg>
   <arg choice="plain"><replaceable>newdatadir</replaceable></arg>
   <arg rep="repeat"><replaceable>option</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

37
 <para>
P
Peter Eisentraut 已提交
38
  <application>pg_upgrade</> (formerly called <application>pg_migrator</>) allows data
39
  stored in <productname>PostgreSQL</> data files to be upgraded to a later <productname>PostgreSQL</>
40 41
  major version without the data dump/reload typically required for
  major version upgrades, e.g. from 8.4.7 to the current major release
P
Peter Eisentraut 已提交
42 43
  of <productname>PostgreSQL</>.  It is not required for minor version upgrades, e.g. from
  9.0.1 to 9.0.4.
44 45
 </para>

46
 <para>
47 48 49 50 51 52 53 54 55 56 57 58 59
  Major PostgreSQL releases regularly add new features that often
  change the layout of the system tables, but the internal data storage
  format rarely changes.  <application>pg_upgrade</> uses this fact
  to perform rapid upgrades by creating new system tables and simply
  reusing the old user data files.  If a future major release ever
  changes the data storage format in a way that makes the old data
  format unreadable, <application>pg_upgrade</> will not be usable
  for such upgrades.  (The community will attempt to avoid such
  situations.)
 </para>

 <para>
  <application>pg_upgrade</> does its best to
60
  make sure the old and new clusters are binary-compatible, e.g.  by
61 62
  checking for compatible compile-time settings, including 32/64-bit
  binaries.  It is important that
P
Peter Eisentraut 已提交
63
  any external modules are also binary compatible, though this cannot
64 65 66
  be checked by <application>pg_upgrade</>.
 </para>

67 68
  <para>
   pg_upgrade supports upgrades from 8.3.X and later to the current
B
Bruce Momjian 已提交
69
   major release of <productname>PostgreSQL</>, including snapshot and alpha releases.
70
  </para>
71
 </refsect1>
72

73 74
 <refsect1>
  <title>Options</title>
75 76 77 78 79 80 81

   <para>
    <application>pg_upgrade</application> accepts the following command-line arguments:

    <variablelist>

     <varlistentry>
82 83
      <term><option>-b</option> <replaceable>bindir</></term>
      <term><option>--old-bindir=</option><replaceable>bindir</></term>
84
      <listitem><para>the old PostgreSQL executable directory;
85
      environment variable <envar>PGBINOLD</></para></listitem>
86 87 88
     </varlistentry>

     <varlistentry>
89 90
      <term><option>-B</option> <replaceable>bindir</></term>
      <term><option>--new-bindir=</option><replaceable>bindir</></term>
91
      <listitem><para>the new PostgreSQL executable directory;
92
      environment variable <envar>PGBINNEW</></para></listitem>
93 94 95
     </varlistentry>

     <varlistentry>
96 97 98
      <term><option>-c</option></term>
      <term><option>--check</option></term>
      <listitem><para>check clusters only, don't change any data</para></listitem>
99 100 101
     </varlistentry>

     <varlistentry>
102 103
      <term><option>-d</option> <replaceable>datadir</></term>
      <term><option>--old-datadir=</option><replaceable>datadir</></term>
104
      <listitem><para>the old cluster data directory; environment
105
      variable <envar>PGDATAOLD</></para></listitem>
106 107 108
     </varlistentry>

     <varlistentry>
109 110
      <term><option>-D</option> <replaceable>datadir</></term>
      <term><option>--new-datadir=</option><replaceable>datadir</></term>
111
      <listitem><para>the new cluster data directory; environment
112
      variable <envar>PGDATANEW</></para></listitem>
113 114
     </varlistentry>

B
Bruce Momjian 已提交
115 116 117 118 119 120 121
     <varlistentry>
      <term><option>-j</option></term>
      <term><option>--jobs</option></term>
      <listitem><para>number of simultaneous processes or threads to use
      </para></listitem>
     </varlistentry>

122
     <varlistentry>
123 124
      <term><option>-k</option></term>
      <term><option>--link</option></term>
125
      <listitem><para>use hard links instead of copying files to the new cluster</para></listitem>
126 127
     </varlistentry>

128 129 130 131 132 133 134 135 136 137 138 139 140 141
     <varlistentry>
      <term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
      <term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>
      <listitem><para>options to be passed directly to the
      old <command>postgres</command> command</para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-O</option> <replaceable class="parameter">options</replaceable></term>
      <term><option>--new-options</option> <replaceable class="parameter">options</replaceable></term>
      <listitem><para>options to be passed directly to the
      new <command>postgres</command> command</para></listitem>
     </varlistentry>

142
     <varlistentry>
143 144
      <term><option>-p</option> <replaceable>port</></term>
      <term><option>--old-port=</option><replaceable>port</></term>
145
      <listitem><para>the old cluster port number; environment
146
      variable <envar>PGPORTOLD</></para></listitem>
147 148 149
     </varlistentry>

     <varlistentry>
150 151
      <term><option>-P</option> <replaceable>port</></term>
      <term><option>--new-port=</option><replaceable>port</></term>
152
      <listitem><para>the new cluster port number; environment
153
      variable <envar>PGPORTNEW</></para></listitem>
154 155
     </varlistentry>

156 157 158 159 160 161 162
     <varlistentry>
      <term><option>-r</option></term>
      <term><option>--retain</option></term>
      <listitem><para>retain SQL and log files even after successful completion
      </para></listitem>
     </varlistentry>

163
     <varlistentry>
164 165
      <term><option>-U</option> <replaceable>username</></term>
      <term><option>--username=</option><replaceable>username</></term>
166 167
      <listitem><para>cluster's super user name; environment
      variable <envar>PGUSER</></para></listitem>
168 169
     </varlistentry>

170
     <varlistentry>
171 172
      <term><option>-v</option></term>
      <term><option>--verbose</option></term>
173
      <listitem><para>enable verbose internal logging</para></listitem>
174 175 176
     </varlistentry>

     <varlistentry>
177 178
      <term><option>-V</option></term>
      <term><option>--version</option></term>
179 180 181 182
      <listitem><para>display version information, then exit</para></listitem>
     </varlistentry>

     <varlistentry>
183
      <term><option>-?</option></term>
184
      <term><option>--help</option></term>
185 186 187 188 189 190
      <listitem><para>show help, then exit</para></listitem>
     </varlistentry>

    </variablelist>
   </para>

191
 </refsect1>
192

193 194 195 196 197 198 199
 <refsect1>
  <title>Usage</title>

  <para>
   These are the steps to perform an upgrade
   with <application>pg_upgrade</application>:
  </para>
200

P
Peter Eisentraut 已提交
201 202 203
  <procedure>
   <step performance="optional">
    <title>Optionally move the old cluster</title>
204

205
    <para>
B
Bruce Momjian 已提交
206
     If you are using a version-specific installation directory, e.g.
207
     <filename>/opt/PostgreSQL/9.1</>, you do not need to move the old cluster. The
208
     graphical installers all use version-specific installation directories.
209
    </para>
210 211

    <para>
B
Bruce Momjian 已提交
212
     If your installation directory is not version-specific, e.g.
P
Peter Eisentraut 已提交
213
     <filename>/usr/local/pgsql</>, it is necessary to move the current PostgreSQL install
B
Bruce Momjian 已提交
214 215
     directory so it does not interfere with the new <productname>PostgreSQL</> installation.
     Once the current <productname>PostgreSQL</> server is shut down, it is safe to rename the
P
Peter Eisentraut 已提交
216 217
     PostgreSQL installation directory; assuming the old directory is
     <filename>/usr/local/pgsql</>, you can do:
218

219 220 221 222 223
<programlisting>
mv /usr/local/pgsql /usr/local/pgsql.old
</programlisting>
     to rename the directory.
    </para>
P
Peter Eisentraut 已提交
224
   </step>
225

P
Peter Eisentraut 已提交
226 227
   <step>
    <title>For source installs, build the new version</title>
228

229
    <para>
P
Peter Eisentraut 已提交
230
     Build the new PostgreSQL source with <command>configure</> flags that are compatible
B
Bruce Momjian 已提交
231
     with the old cluster. <application>pg_upgrade</> will check <command>pg_controldata</> to make
232 233
     sure all settings are compatible before starting the upgrade.
    </para>
P
Peter Eisentraut 已提交
234
   </step>
235

P
Peter Eisentraut 已提交
236 237
   <step>
    <title>Install the new PostgreSQL binaries</title>
238

239
    <para>
240
     Install the new server's binaries and support files.
241
    </para>
242

243 244
    <para>
     For source installs, if you wish to install the new server in a custom
P
Peter Eisentraut 已提交
245
     location, use the <literal>prefix</literal> variable:
246

247 248
<programlisting>
gmake prefix=/usr/local/pgsql.new install
249
</programlisting></para>
P
Peter Eisentraut 已提交
250
   </step>
251

P
Peter Eisentraut 已提交
252
   <step>
253
    <title>Install pg_upgrade and pg_upgrade_support</title>
P
Peter Eisentraut 已提交
254

255
    <para>
256
     Install the <application>pg_upgrade</> binary and
257 258
     <application>pg_upgrade_support</> library in the new PostgreSQL
     installation.
259
    </para>
P
Peter Eisentraut 已提交
260
   </step>
261

P
Peter Eisentraut 已提交
262 263
   <step>
    <title>Initialize the new PostgreSQL cluster</title>
264

265
    <para>
P
Peter Eisentraut 已提交
266 267
     Initialize the new cluster using <command>initdb</command>.
     Again, use compatible <command>initdb</command>
B
Bruce Momjian 已提交
268
     flags that match the old cluster. Many
269 270 271
     prebuilt installers do this step automatically. There is no need to
     start the new cluster.
    </para>
P
Peter Eisentraut 已提交
272
   </step>
273

P
Peter Eisentraut 已提交
274 275
   <step>
    <title>Install custom shared object files</title>
276

277 278
    <para>
     Install any custom shared object files (or DLLs) used by the old cluster
279
     into the new cluster, e.g. <filename>pgcrypto.so</filename>,
280
     whether they are from <filename>contrib</filename>
281
     or some other source. Do not install the schema definitions, e.g.
282
     <filename>pgcrypto.sql</>, because these will be upgraded from the old cluster.
283
    </para>
P
Peter Eisentraut 已提交
284
   </step>
285

P
Peter Eisentraut 已提交
286 287
   <step>
    <title>Adjust authentication</title>
288

289
    <para>
P
Peter Eisentraut 已提交
290
     <command>pg_upgrade</> will connect to the old and new servers several times,
291 292 293 294
     so you might want to set authentication to <literal>trust</>
     or <literal>peer</> in <filename>pg_hba.conf</>, or if using
     <literal>md5</> authentication, use a <filename>~/.pgpass</> file
     (see <xref linkend="libpq-pgpass">).
295
    </para>
P
Peter Eisentraut 已提交
296
   </step>
297

P
Peter Eisentraut 已提交
298 299
   <step>
    <title>Stop both servers</title>
300

301
    <para>
302
     Make sure both database servers are stopped using, on Unix, e.g.:
303

304
<programlisting>
P
Peter Eisentraut 已提交
305 306
pg_ctl -D /opt/PostgreSQL/8.4 stop
pg_ctl -D /opt/PostgreSQL/9.0 stop
307
</programlisting>
308

309
     or on Windows, using the proper service names:
310

311 312 313 314
<programlisting>
NET STOP postgresql-8.4
NET STOP postgresql-9.0
</programlisting>
315

316
     or
317

318
<programlisting>
B
Bruce Momjian 已提交
319
NET STOP pgsql-8.3  (<productname>PostgreSQL</> 8.3 and older used a different service name)
320
</programlisting></para>
P
Peter Eisentraut 已提交
321
   </step>
322

P
Peter Eisentraut 已提交
323 324
   <step>
    <title>Run <application>pg_upgrade</></title>
325

326
    <para>
327
     Always run the <application>pg_upgrade</> binary of the new server, not the old one.
B
Bruce Momjian 已提交
328
     <application>pg_upgrade</> requires the specification of the old and new cluster's
329
     data and executable (<filename>bin</>) directories. You can also specify
330
     user and port values, and whether you want the data linked instead of
331
     copied (the default).
332 333 334 335 336 337 338
    </para>

    <para>
     If you use link mode, the upgrade will be much faster (no file
     copying), but you will not be able to access your old cluster
     once you start the new cluster after the upgrade.  Link mode also
     requires that the old and new cluster data directories be in the
339 340
     same file system.  (Tablespaces and <filename>pg_xlog</> can be on
     different file systems.)  See <literal>pg_upgrade --help</> for a full
341
     list of options.
B
Bruce Momjian 已提交
342
    </para>
343

B
Bruce Momjian 已提交
344 345
    <para>
     The <option>--jobs</> option allows multiple CPU cores to be used
346 347 348 349 350
     for copying/linking of files and to dump and reload database schemas
     in parallel;  a good place to start is the maximum of the number of
     CPU cores and tablespaces.  This option can dramatically reduce the
     time to upgrade a multi-database server running on a multiprocessor
     machine.
B
Bruce Momjian 已提交
351
    </para>
352

353 354
    <para>
     For Windows users, you must be logged into an administrative account, and
P
Peter Eisentraut 已提交
355
     then start a shell as the <literal>postgres</> user and set the proper path:
356

357 358
<programlisting>
RUNAS /USER:postgres "CMD.EXE"
359
SET PATH=%PATH%;C:\Program Files\PostgreSQL\9.0\bin;
360
</programlisting>
361

B
Bruce Momjian 已提交
362
     and then run <application>pg_upgrade</> with quoted directories, e.g.:
363

364 365 366
<programlisting>
pg_upgrade.exe
        --old-datadir "C:/Program Files/PostgreSQL/8.4/data"
367
        --new-datadir "C:/Program Files/PostgreSQL/9.0/data"
368
        --old-bindir "C:/Program Files/PostgreSQL/8.4/bin"
369
        --new-bindir "C:/Program Files/PostgreSQL/9.0/bin"
370
</programlisting>
371

P
Peter Eisentraut 已提交
372
     Once started, <command>pg_upgrade</> will verify the two clusters are compatible
373
     and then do the upgrade. You can use <command>pg_upgrade --check</>
374
     to perform only the checks, even if the old server is still
P
Peter Eisentraut 已提交
375
     running. <command>pg_upgrade --check</> will also outline any
376 377 378
     manual adjustments you will need to make after the upgrade.  If you
     are going to be using link mode, you should use the <option>--link</>
     option with <option>--check</option> to enable link-mode-specific checks.
379
     <command>pg_upgrade</> requires write permission in the current directory.
380
    </para>
381

382
    <para>
383 384 385
     Obviously, no one should be accessing the clusters during the
     upgrade.  <application>pg_upgrade</> defaults to running servers
     on port 50432 to avoid unintended client connections.
386 387 388 389
     You can use the same port number for both clusters when doing an
     upgrade because the old and new clusters will not be running at the
     same time.  However, when checking an old running server, the old
     and new port numbers must be different.
390
    </para>
391

392
    <para>
P
Peter Eisentraut 已提交
393 394 395
     If an error occurs while restoring the database schema, <command>pg_upgrade</> will
     exit and you will have to revert to the old cluster as outlined in <xref linkend="pgupgrade-step-revert">
     below. To try <command>pg_upgrade</command> again, you will need to modify the old
396
     cluster so the pg_upgrade schema restore succeeds. If the problem is a
P
Peter Eisentraut 已提交
397
     contrib module, you might need to uninstall the contrib module from
398
     the old cluster and install it in the new cluster after the upgrade,
399 400
     assuming the module is not being used to store user data.
    </para>
P
Peter Eisentraut 已提交
401
   </step>
402

P
Peter Eisentraut 已提交
403 404
   <step>
    <title>Restore <filename>pg_hba.conf</></title>
405

406 407
    <para>
     If you modified <filename>pg_hba.conf</> to use <literal>trust</>,
408 409 410
     restore its original authentication settings.  It might also be
     necessary to adjust other configurations files in the new cluster to
     match the old cluster, e.g. <filename>postgresql.conf</>.
411
    </para>
P
Peter Eisentraut 已提交
412
   </step>
413

P
Peter Eisentraut 已提交
414
   <step>
415
    <title>Post-Upgrade processing</title>
416

417
    <para>
418
     If any post-upgrade processing is required, pg_upgrade will issue
419 420
     warnings as it completes. It will also generate script files that must
     be run by the administrator. The script files will connect to each
421
     database that needs post-upgrade processing. Each script should be
422
     run using:
423

424 425 426
<programlisting>
psql --username postgres --file script.sql postgres
</programlisting>
427

428 429 430
     The scripts can be run in any order and can be deleted once they have
     been run.
    </para>
B
Bruce Momjian 已提交
431

432
    <caution>
433 434 435 436 437 438
    <para>
     In general it is unsafe to access tables referenced in rebuild scripts
     until the rebuild scripts have run to completion; doing so could yield
     incorrect results or poor performance. Tables not referenced in rebuild
     scripts can be accessed immediately.
    </para>
B
Bruce Momjian 已提交
439
    </caution>
P
Peter Eisentraut 已提交
440
   </step>
441

P
Peter Eisentraut 已提交
442 443 444
   <step>
    <title>Statistics</title>

445
    <para>
P
Peter Eisentraut 已提交
446
     Because optimizer statistics are not transferred by <command>pg_upgrade</>, you will
447
     be instructed to run a command to regenerate that information at the end
448 449
     of the upgrade.  You might need to set connection parameters to
     match your new cluster.
450
    </para>
P
Peter Eisentraut 已提交
451
   </step>
452

P
Peter Eisentraut 已提交
453 454
   <step>
    <title>Delete old cluster</title>
455

456 457 458
    <para>
     Once you are satisfied with the upgrade, you can delete the old
     cluster's data directories by running the script mentioned when
P
Peter Eisentraut 已提交
459 460 461 462 463
     <command>pg_upgrade</command> completes. You can also delete the
     old installation directories
     (e.g. <filename>bin</>, <filename>share</>).
    </para>
   </step>
464

P
Peter Eisentraut 已提交
465 466
   <step id="pgupgrade-step-revert" performance="optional">
    <title>Reverting to old cluster</title>
467

P
Peter Eisentraut 已提交
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
    <para>
     If, after running <command>pg_upgrade</command>, you wish to revert to the old cluster,
     there are several options:

     <itemizedlist>
      <listitem>
       <para>
        If you ran <command>pg_upgrade</command>
        with <option>--check</>, no modifications were made to the old
        cluster and you can re-use it anytime.
       </para>
      </listitem>

      <listitem>
       <para>
        If you ran <command>pg_upgrade</command>
        with <option>--link</>, the data files are shared between the
        old and new cluster. If you started the new cluster, the new
        server has written to those shared files and it is unsafe to
        use the old cluster.
       </para>
      </listitem>

      <listitem>
       <para>
493 494 495 496 497 498 499 500
        If you ran <command>pg_upgrade</command> <emphasis>without</>
        <option>--link</> or did not start the new server, the
        old cluster was not modified except that, if linking
        started, a <literal>.old</> suffix was appended to
        <filename>$PGDATA/global/pg_control</>.  To reuse the old
        cluster, possibly remove the <filename>.old</> suffix from
        <filename>$PGDATA/global/pg_control</>; you can then restart the
        old cluster.
P
Peter Eisentraut 已提交
501 502 503 504 505 506
       </para>
      </listitem>
     </itemizedlist>
    </para>
   </step>
  </procedure>
507

508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   <application>pg_upgrade</> does not support upgrading of databases
   containing these <type>reg*</> OID-referencing system data types:
   <type>regproc</>, <type>regprocedure</>, <type>regoper</>,
   <type>regoperator</>, <type>regconfig</>, and
   <type>regdictionary</>.  (<type>regtype</> can be upgraded.)
  </para>

  <para>
   All failure, rebuild, and reindex cases will be reported by
   <application>pg_upgrade</> if they affect your installation;
   post-upgrade scripts to rebuild tables and indexes will be
525 526 527 528 529
   generated automatically.  If you are trying to automate the upgrade
   of many clusters, you should find that clusters with identical database
   schemas require the same post-upgrade steps for all cluster upgrades;
   this is because the post-upgrade steps are based on the database
   schemas, and not user data.
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
  </para>

  <para>
   For deployment testing, create a schema-only copy of the old cluster,
   insert dummy data, and upgrade that.
  </para>

  <para>
   If you are upgrading a pre-<productname>PostgreSQL</> 9.2 cluster
   that uses a configuration-file-only directory, you must pass the
   real data directory location to <application>pg_upgrade</>, and
   pass the configuration directory location to the server, e.g.
   <literal>-d /real-data-directory -o '-D /configuration-directory'</>.
  </para>

545
  <para>
546 547 548 549
   If using a pre-9.1 old server that is using a non-default Unix-domain
   socket directory or a default that differs from the default of the
   new cluster, set <envar>PGHOST</> to point to the old server's socket
   location.  (This is not relevant on Windows.)
550 551
  </para>

552 553 554
  <para>
   A Log-Shipping Standby Server (<xref linkend="warm-standby">) cannot
   be upgraded because the server must allow writes.  The simplest way
555 556 557 558
   is to upgrade the primary and use <command>rsync</> to rebuild the
   standbys.  You can run <command>rsync</> while the primary is down,
   or as part of a base backup (<xref linkend="backup-base-backup">)
   which overwrites the old standby cluster.
559 560
  </para>

561 562 563 564 565 566 567
  <para>
   If you want to use link mode and you do not want your old cluster
   to be modified when the new cluster is started, make a copy of the
   old cluster and upgrade that in link mode. To make a valid copy
   of the old cluster, use <command>rsync</> to create a dirty
   copy of the old cluster while the server is running, then shut down
   the old server and run <command>rsync</> again to update the copy with any
568 569 570
   changes to make it consistent.  You might want to exclude some
   files, e.g. <filename>postmaster.pid</>, as documented in <xref
   linkend="backup-lowlevel-base-backup">.
571
  </para>
572

573
 <refsect2>
574
  <title>Limitations in Upgrading from PostgreSQL 8.3</title>
575

576
  <para>
577
   Upgrading <emphasis>from</emphasis> PostgreSQL 8.3 has additional restrictions not present
578
   when upgrading from later PostgreSQL releases.  For example,
579
   pg_upgrade will not work for upgrading from 8.3 if a user column
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
   is defined as:
   <itemizedlist>
    <listitem>
     <para>
      a <type>tsquery</> data type
     </para>
    </listitem>
    <listitem>
     <para>
      data type <type>name</> and is not the first column
     </para>
    </listitem>
   </itemizedlist>
  </para>

  <para>
596
   You must drop any such columns and upgrade them manually.
597
  </para>
598

599 600 601 602 603
  <para>
   pg_upgrade will not work if the <filename>ltree</>
   contrib module is installed in a database.
  </para>

604 605 606 607 608
  <para>
   pg_upgrade will require a table rebuild if:
   <itemizedlist>
    <listitem>
     <para>
P
Peter Eisentraut 已提交
609
      a user column is of data type <type>tsvector</type>
610 611 612 613
     </para>
    </listitem>
   </itemizedlist>
  </para>
614

615 616 617 618 619
  <para>
   pg_upgrade will require a reindex if:
   <itemizedlist>
    <listitem>
     <para>
P
Peter Eisentraut 已提交
620
      an index is of type hash or GIN
621 622 623 624 625 626 627 628 629
     </para>
    </listitem>
    <listitem>
     <para>
      an index uses <function>bpchar_pattern_ops</>
     </para>
    </listitem>
   </itemizedlist>
  </para>
630

631 632
  <para>
   Also, the default datetime storage format changed to integer after
B
Bruce Momjian 已提交
633
   <productname>PostgreSQL</> 8.3. pg_upgrade will check that the datetime storage format
634 635 636
   used by the old and new clusters match. Make sure your new cluster is
   built with the configure flag <option>--disable-integer-datetimes</>.
  </para>
637

638 639
  <para>
   For Windows users, note that due to different integer datetimes settings
640 641 642 643
   used by the graphical installer and the MSI installer, it is only
   possible to upgrade from version 8.3 of the installer distribution to
   version 8.4 or later of the installer distribution. It is not
   possible to upgrade from the MSI installer to the new graphical installer.
644
  </para>
645

646
 </refsect2>
647

648
 </refsect1>
649

650 651
 <refsect1>
  <title>See Also</title>
652

653 654 655 656 657 658 659 660
  <simplelist type="inline">
   <member><xref linkend="app-initdb"></member>
   <member><xref linkend="app-pg-ctl"></member>
   <member><xref linkend="app-pgdump"></member>
   <member><xref linkend="app-postgres"></member>
  </simplelist>
 </refsect1>
</refentry>