summaryrefslogtreecommitdiff
path: root/postgresql/README
blob: ce9f9f5291fa89ad8c274a4de5ea332939e49afd (plain)
    1 README POSTGRESQL
    2 =================
    3 
    4 UPGRADING FROM A PREVIOUS VERSION
    5 ---------------------------------
    6 If upgrading from a non-compatible version (ie 8.0.x >> 8.1.x)
    7 be sure to dump the databases before upgrading and restore them
    8 later.
    9 
   10 Example: (for your convenience, there could be better ways to
   11           achieve this)
   12 
   13 # pg_dumpall -U postgres > pg.dump
   14 # /etc/rc.d/postgresql stop
   15 
   16 # mv /var/pgsql/data /var/pgsql/data-backup
   17 # mkdir /var/pgsql/data
   18 # chown postgres /var/pgsql/data
   19 
   20 # su - postgres
   21 # initdb -D /var/pgsql/data
   22 # exit
   23 
   24 # /etc/rc.d/postgresql start
   25 # psql -U postgres -f pg.dump postgres
   26 
   27 Do not forget to update / copy old config files to /var/pgsql/data 
   28 
   29 
   30 NEW INSTALL
   31 -----------
   32 
   33 To complete the installation and create a test database you need to do
   34 some additional steps:
   35 
   36 # useradd -m -d /home/postgres postgres
   37 # passwd -l postgres
   38 
   39 # mkdir -p /var/pgsql/data
   40 # touch /var/log/postgresql
   41 # chown postgres /var/pgsql/data /var/log/postgresql
   42 
   43 # su - postgres
   44 # initdb -D /var/pgsql/data
   45 # exit
   46 
   47 # /etc/rc.d/postgresql start
   48 # su - postgres
   49 # createdb test
   50 # psql test
   51 
   52 Edit /etc/cron/weekly/syslog as root and add
   53 a line "/usr/sbin/rotatelog postgresql"
   54 
   55 The complete installation instructions are located here:
   56 
   57 http://www.postgresql.org/docs/current/interactive/installation.html

Generated by cgit