|
| 1 | +The following notes are for the benefit of users who want to migrate |
| 2 | +databases from postgres95 1.0 to postgres95 1.01. |
| 3 | + |
| 4 | +If you are starting afresh with postgres95 1.01 and do not need |
| 5 | +to migrate old databases, you do not need to read any further. |
| 6 | + |
| 7 | +---------------------------------------------------------------------- |
| 8 | + |
| 9 | +In order to postgres95 version 1.01 with databases created with |
| 10 | +postgres95 version 1.0, the following steps are required: |
| 11 | + |
| 12 | +1) Set the definition of NAMEDATALEN in src/Makefile.global to 16 |
| 13 | + and OIDNAMELEN to 20. |
| 14 | + |
| 15 | +2) Decide whether you want to use Host based authentication. |
| 16 | + |
| 17 | + A) If you do, you must create a file name "pg_hba" in your top-level data |
| 18 | + directory (typically the value of your $PGDATA). src/libpq/pg_hba |
| 19 | + shows an example syntax. |
| 20 | + |
| 21 | + B) If you do not want host-based authentication, you can comment out |
| 22 | + the line |
| 23 | + HBA = 1 |
| 24 | + in src/Makefile.global |
| 25 | + |
| 26 | + Note that host-based authentication is turned on by default, and if |
| 27 | + you do not take steps A or B above, the out-of-the-box 1.01 will |
| 28 | + not allow you to connect to 1.0 databases. |
| 29 | + |
| 30 | +3) compile and install 1.01, but DO NOT do the initdb step. |
| 31 | + |
| 32 | +4) before doing anything else, terminate your 1.0 postmaster, and |
| 33 | + backup your existing $PGDATA directory. |
| 34 | + |
| 35 | +5) set your PGDATA environment variable to your 1.0 databases, but set up |
| 36 | + path up so that 1.01 binaries are being used. |
| 37 | + |
| 38 | +6) modify the file $PGDATA/PG_VERSION from 5.0 to 5.1 |
| 39 | + |
| 40 | +7) start up a new 1.01 postmaster |
| 41 | + |
| 42 | +5) Add the new built-in functions and operators of 1.01 to 1.0 |
| 43 | + databases. This is done by running the new 1.01 server against |
| 44 | + your own 1.0 database and applying the queries attached and saving |
| 45 | + in the file 1.0_to_1.01.sql. This can be done easily through psql. |
| 46 | + If your 1.0 database is name "testdb": |
| 47 | + |
| 48 | + % psql testdb -f 1.0_to_1.01.sql |
| 49 | + |
| 50 | +------------------------------------------------------------------------------ |
1 | 51 | -- add builtin functions that are new to 1.01
|
2 | 52 |
|
3 | 53 | create function int4eqoid (int4, oid) returns bool as 'foo'
|
|
0 commit comments