Re: How to store data on an external drive

From: Martin Gainty <mgainty(at)hotmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to store data on an external drive
Date: 2009-09-08 02:00:07
Message-ID: BLU142-W8B1319F1547F6678BC6D4AEEA0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


your tables are probably not using the new default tablespace

SET default_tablespace = new_tablespace_name
any new tables will be placed into new default tablespace by inserting TABLESPACE clause
can you put the WHOLE database on the external drive?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

> Date: Mon, 7 Sep 2009 20:20:52 -0400
> From: chen(dot)1002(at)gmail(dot)com
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] How to store data on an external drive
>
> Hi there,
>
> As a beginner of PostgreSQL, I installed PostgreSQL 8.3.7 on Ubuntu 9.04
> by using sudo apt-get install.
>
> 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.
>
> I tried to use tablespaces as in
> http://www.postgresql.org/docs/8.3/static/manage-ag-tablespaces.html.
> But, it does not seem to work because once I create a tablespace located
> at one folder in the external drive for one machine, I can not create a
> tablespace located at the same folder on the other machine since the
> folder is not empty any more.
>
> Then, on my home machine, I copied everything in
> /var/lib/postgresql/8.3/main to a folder on my external drive (say
> folder /media/disk/psqldata) and edited postgresql.conf to comment out
> line data_directory = '/var/lib/postgresql/8.3/main' and add
> data_directory = '/media/disk/psqldata'. I am hoping that once I edit
> postgresql.conf on my office machine the same way, it would work. But,
> my guess is that this won't work.
>
> Please let me know whether this is right way to do it. Please let me
> know your way of doing it too. Thanks.
>
> Best,
> Jia
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jia Chen 2009-09-08 02:39:36 Re: How to store data on an external drive
Previous Message Jia Chen 2009-09-08 00:20:52 How to store data on an external drive