Обсуждение: Problems setting up DB at a different location
Hi, I'm trying to place a database on a different harddisk than the default one PostgreSQL uses. I've read and followed the instructions of the User Documentation Sections 6.1.1 and 10.2. export PGDATA2="/data/db" initlocation PGDATA2 so far, so good, everything worked. But now, when I createdb mydb -D PGDATA2 from the commandline or CREATE DATABASE mydb WITH LOCATION = 'PGDATA2'; from psql, I get the message ERROR: Postmaster environment variable 'PGDATA2' not set despite it being set, obviously. Trying to SET it again from within psql resulted in being told that 'pgdata2' was not a valid option name. This is PostgreSQL 7.1.2 from the Debian Linux distribution. Can anyone point me to what I'm doing wrong? Regs, Sven -- Sven Riedel sr@gimp.org Osteroeder Str. 6 / App. 13 sven.riedel@tu-clausthal.de 38678 Clausthal "Call me bored, but don't call me boring." - Larry Wall
Sven- I am attaching an html file from our internal company documentation that may help. We are running PostgreSQL 7.1.3 on Debian. The section in the html file marked "Some general concepts and experiences we've had:" includes a description of how we placed data in a separate area. (Most of the links in this doc won't work because they refer to files that live behind our firewall.) One problem that I had was forgetting to use the "-" when doing "su - postgres". The "-" ensures that you pick up any environment variables defined in the postgres user's .profile I hope this helps. I can offer further assistance if it does not. -Nick --------------------------------------------------------------------- Nick Fankhauser nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/