summaryrefslogtreecommitdiff
path: root/postgresql/README
blob: 3b2d97e041188dd600676c4197d5de8c6c048136 (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 or
    7 8.x.y >> 9.a.b) be sure to dump the databases before upgrading and
    8 restore them 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 # sudo -u postgres initdb -D /var/pgsql/data
   21 
   22 # /etc/rc.d/postgresql start
   23 # psql -U postgres -f pg.dump postgres
   24 
   25 Do not forget to update / copy old config files to /var/pgsql/data 
   26 
   27 
   28 NEW INSTALL
   29 -----------
   30 
   31 To complete the installation and create a test database you need to do
   32 some additional steps:
   33 
   34 # useradd -m -d /home/postgres -s /bin/false postgres
   35 # passwd -l postgres
   36 
   37 # mkdir -p /var/pgsql/data
   38 # touch /var/log/postgresql
   39 # chown postgres /var/pgsql/data /var/log/postgresql
   40 
   41 # sudo -u postgres initdb -D /var/pgsql/data
   42 
   43 # /etc/rc.d/postgresql start
   44 # sudo -u postgres createdb test
   45 # psql -U postgres test
   46 
   47 Edit /etc/cron/weekly/syslog as root and add
   48 a line "/usr/sbin/rotatelog postgresql"
   49 
   50 The complete installation instructions are located here:
   51 
   52 http://www.postgresql.org/docs/current/interactive/installation.html

Generated by cgit