Re: A question on PSQL 8.3 setup

From: Jong Chun Park <joumon(at)gmail(dot)com>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: A question on PSQL 8.3 setup
Date: 2009-07-23 19:48:34
Message-ID: 2e320c2d0907231248j3dc7f85ao63f911c00d658829@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, it's working now. I appreciate your help. The problem was to not stoppsql
process even before doing anything.

Thanks a lot,
Jong

On Thu, Jul 23, 2009 at 7:38 AM, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:

> On Thu, Jul 23, 2009 at 01:08:26AM -0600, Jong Chun Park wrote:
> > I need to configure PSQL to store all DB-related data into
> > /home/pgsql/data instead of somewhere in / such as /var/lib/
> > postgresql/8.3/... or /usr/local/pgsql/data.
>
> Assuming you're using the standard builds in Ubuntu, I'd probably do
> something like:
>
> 1) make your directory if you haven't got one already:
> mkdir /home/postgres
> chown postgres:postgres /home/postgres
>
> 2) shut down postgres
> /etc/init.d/postgres-8.3 stop
>
> 3) copy the existing database cluster over to its new location
> cp -a /var/lib/postgresql/8.3 /home/postgres
>
> 4) move the old cluster out of the way for safe keeping and put a
> symlink back in place
> mv /var/lib/postgresql/8.3 /var/lib/postgresql/8.3-old
> ln -s /home/postgres/8.3 /var/lib/postgresql/8.3
>
> 5) start PG again
> /etc/init.d/postgres-8.3 start
>
> if that all works then you've got the option of dumping the old data
> that was stashed away above and update the config file to point straight
> to the new location.
>
> --
> Sam http://samason.me.uk/
>
> --
> 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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefano Nichele 2009-07-23 21:09:39 user/grant - best practices handling permission in production system
Previous Message Christophe 2009-07-23 19:39:59 Re: 3des key lengths and key management