Re: How to store data on an external drive

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: How to store data on an external drive
Дата
Msg-id 20090908101328.GG5407@samason.me.uk
обсуждение исходный текст
Ответ на Re: How to store data on an external drive  (Jasen Betts <jasen@xnet.co.nz>)
Список pgsql-general
On Tue, Sep 08, 2009 at 08:52:23AM +0000, Jasen Betts wrote:
> On 2009-09-08, Jia Chen <chen.1002@gmail.com> wrote:
> > Now, I want to store PostgreSQL data on an external drive because I work
> > both on my office machine and on my home machine a lot.  This way, I can
> > always bring my external drive to either location and work on data
> > stored on the drive.
>
> start again and install from the source.
> the ubuntu packge spreads the components of the postgres database about
> putting some in /usr/bin, /usr/lib, /etc/postgres, /var/log, /var/lib and /etc

I don't think you need to go that far.  I'd just do an "initdb"
somewhere on the removable disk and then start PG pointing at where the
cluster was (i.e. postgres -D /media/disk/psqldata) and all should be
good.  I'd stay away from the official system startup scripts for PG.

> you should install them all onto the removable drive instead.
> it's not just the table data that is needed need for the database to work.

Yup, the table data is very tied to the state of transactions and
other "system level" information, you need to keep everything together
unfortunately.  This is the price of having transactions with ACID
semantics.

One other thing to note is that PG tends to change the on-disk format
between "major" versions, where a major version is defined as the second
digit changing.  8.3 and 8.2 are different major versions and have
different on-disk formats, while 8.3.6 and 8.3.7 are not.

--
  Sam  http://samason.me.uk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: Fail to start Postgres on Ubuntu kernel 2.6.28-15-generic
Следующее
От: Markus Pscheidt
Дата:
Сообщение: Re: Fail to start Postgres on Ubuntu kernel 2.6.28-15-generic