User Tools

Site Tools


postgresql:8.2:debian

This is an old revision of the document!


Installing PostgreSQL 8.2 from source on Debian or Ubuntu

Some distributions, such as Debian Etch, do not offer packages for PostgreSQL 8.2—but Evergreen 1.4 requires PostgreSQL 8.2. Following is a rough set of instructions for installing PostgreSQL 8.2 from source on a Debian or Ubuntu system as a stow-managed application.

  1. If you have not yet installed stow on your system, install it. Issue the following command as the root user:
    aptitude install stow
  2. Download, compile, and install the latest bugfix release for PostgreSQL 8.2 (8.2.12 at the time this was written):
    wget http://wwwmaster.postgresql.org/redir/198/h/source/v8.2.12/postgresql-8.2.12.tar.bz2
    tar xjf postgresql-8.2.12.tar.bz2
    cd postgresql-8.2.12
    ./configure --with-perl --enable-integer-datetimes --with-openssl --prefix=/usr/local/stow/pgsql && make
    make install
    cd contrib && make
    make install
    cd xml2 && make
    make install
    cd /usr/local/stow
    stow pgsql
    # if there was a conflict, you can move the offending directory out of the way:
    mv /usr/local/man /usr/local/man.bak
    # then try again
    stow pgsql
  3. Create a new user, postgres, to run the PostgreSQL processes:
    adduser postgres
  4. Initialize the database directory and start up PostgreSQL:
    mkdir -p /usr/local/pgsql/data
    chown postgres /usr/local/pgsql/data
    su - postgres
    initdb -D /usr/local/pgsql/data -E UNICODE --locale=C
    pg_ctl -D /usr/local/pgsql/data -l /home/postgres/logfile start

Config stuff to change

FIXME

echo 7000000000 > /proc/sys/kernel/shmmax

default stats target (from 10 to 100)

work mem (from 4m to something higher… 128M?)

Shared buffers (to 512M for a 2G machine)

Effective cache size

(11:41:49 AM) dmcmorris_esi: miker_: stats target , workmem, shared buffers for 32GB Mem (11:42:34 AM) miker_: stats target = 100 (always), work mem = 128M, shared buffers = 4G (11:42:51 AM) miker_: effective cache size = 24G

Vaccuum full analyze verbose

postgresql/8.2/debian.1248869901.txt.gz · Last modified: 2022/02/10 13:34 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.