[prev] 52 [next]

Using PostgreSQL for Assignments (cont)

If you change storage structures ...
  • old database will not work with the new server
  • need to dump, re-run initdb, then restore

# edit source code to make changes
$ pg_dump testdb > testdb.dump
$ make
$ pg_ctl stop
$ rm -fr /your/pgsql/directory/data
$ make install
$ initdb
# restore postgresql configuration
$ pg_ctl start
$ createdb testdb
$ psql testdb -f testdb.dump
# run tests and analyse results

Need to save a copy of postgresql.conf before re-installing.