Her er en oppskrift for å få alle Norges poststeder inn i en egnet tabell.
All commands were done as the
root user unless indicated.
su -l pgsql pg_dumpall | bzip2 -9c > all-db-9.4.6-2016-02-17.sql.bz2 chmod 0600 all-db-9.4.6-2016-02-17.sql.bz2 exit /usr/local/etc/rc.d/postgresql stop make -C /usr/ports/databases/postgresql95-server config-recursive pkg delete databases/postgresql94-contrib portupgrade -fpvo databases/postgresql95-client databases/postgresql94-client portupgrade -Nfpv databases/postgresql95-contrib portupgrade -fpvo databases/postgresql95-server databases/postgresql94-server portupgrade -fprv -x databases/postgresql95-client -x databases/postgresql95-server -x databases/postgresql95-contrib databases/postgresql95-client mv /usr/local/pgsql/data /usr/local/pgsql/data0 su -l pgsql -c 'mkdir /usr/local/pgsql/data' /usr/local/etc/rc.d/postgresql initdb /usr/local/etc/rc.d/postgresql start su -l pgsql bzcat all-db-9.4.6-2016-02-17.sql.bz2 | psql -f - template1 # Transfer all relevant settings from /usr/local/pgsql/data0 to /usr/local/pgsql/data for pg_hba.conf and postgresql.conf exit /usr/local/etc/rc.d/postgresql restart su -l pgsql pg_dumpall | bzip2 -9c > all-db-9.5.1-2016-02-17.sql.bz2 chmod 0600 all-db-9.5.1-2016-02-17.sql.bz2 exit rm -R /usr/local/pgsql/data0
I decided to upgrade my PostgreSQL server today. I did this upgrade slightly different than the last time. All commands were done as the
root user unless indicated. Continue reading Upgrading PostgreSQL 9.2.10 to 9.4.1
Today, I decided to upgrade PostgreSQL from 9.1.5 to 9.2.0 on one of my computers. Ironically, PostgreSQL 9.2.1 was released today, but until the FreeBSD ports hierarchy catches up, the most recent version available is 9.2.0, unless of course you want to do everything yourself. Continue reading Upgrading PostgreSQL from 9.1.5 to 9.2.0
The default startup script for PostgreSQL on FreeBSD doesn’t give much clue when starting and stopping the DBMS. Here’s a patch to remedy this annoyance. Continue reading A verbose startup script for PostgreSQL on FreeBSD