From: | Craig James <cjames(at)emolecules(dot)com> |
---|---|
To: | Zoltan Szecsei <zoltans(at)geograph(dot)co(dot)za> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: dropping all databases and starting afresh |
Date: | 2015-02-02 19:12:57 |
Message-ID: | CAFwQ8rdkRCMoDEwX0AHFrMHxTpO=epN0HmUdT+UtMF4cjToijQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, Feb 2, 2015 at 8:52 AM, Zoltan Szecsei <zoltans(at)geograph(dot)co(dot)za>
wrote:
> Hi,
> Just joined the list, and this is first time foray into SQL databases, so
> apologies for the (most likely) lame questions.
> I have installed 9.4 with PostGIS on Ubuntu 14.10 64bit Desktop.
>
> After install I didn't like where the default databases went to, so I did:
>
> mkdir /mnt/geo_md1/postgres
> chown postgres:postgres /mnt/geo_md1/postgres
> su postgres
> postgres(at)gs01:/home/geograph$ createuser -s -d -e --replication zls
> postgres(at)gs01:/home/geograph$ pg_dropcluster –stop 9.4 main
> postgres(at)gs01:/home/geograph$ pg_createcluster --start -d
> /mnt/geo_md1/postgres 9.4 gisdata
>
> After fiddling for a few days, I now want to start afresh, by deleting
> all data and creating a new area in a different directory, but:
>
> neither:
>
> postgres(at)gs01:/etc$ pg_dropcluster –-stop 9.4 gisdata
> Usage: /usr/bin/pg_dropcluster [--stop] <version> <cluster>
>
> nor
>
> postgres(at)gs01:/etc$ pg_dropcluster –-stop 9.4 postgres
> Usage: /usr/bin/pg_dropcluster [--stop] <version> <cluster>
>
> works.
> I've done no createdb commands, so dopdb shouldn't be what I want for this
> cleanup (I'd think).
>
> Please can someone spot my oversight.
> I'd like to cleanup, change the mount-point for my RAID, and then create a
> fresh start.
>
Destroying a database is easy if you are really are sure you don't want
your data. Just kill Postgres, find the data directory, and delete
everything.
Craig
>
> Thanks in advance,
> Zoltan
>
> postgres(at)gs01:/etc$ ls -la /mnt/geo_md1/postgres
> total 84
> drwx------ 18 postgres postgres 4096 Feb 2 18:07 .
> drwxrwxrwx 4 staff staff 4096 Jan 29 18:32 ..
> drwx------ 5 postgres postgres 4096 Jan 29 18:34 base
> drwx------ 2 postgres postgres 4096 Feb 1 14:13 global
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_clog
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_dynshmem
> drwx------ 4 postgres postgres 4096 Jan 29 18:34 pg_logical
> drwx------ 4 postgres postgres 4096 Jan 29 18:34 pg_multixact
> drwx------ 2 postgres postgres 4096 Feb 1 14:13 pg_notify
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_replslot
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_serial
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_snapshots
> drwx------ 2 postgres postgres 4096 Feb 1 14:24 pg_stat
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_stat_tmp
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_subtrans
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_tblspc
> drwx------ 2 postgres postgres 4096 Jan 29 18:34 pg_twophase
> -rw------- 1 postgres postgres 4 Jan 29 18:34 PG_VERSION
> drwx------ 3 postgres postgres 4096 Jan 29 18:34 pg_xlog
> -rw------- 1 postgres postgres 88 Jan 29 18:34 postgresql.auto.conf
> -rw------- 1 postgres postgres 129 Feb 1 14:13 postmaster.opts
>
>
>
>
>
--
---------------------------------
Craig A. James
Chief Technology Officer
eMolecules, Inc.
---------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Crawford | 2015-02-02 19:27:35 | Re: Hi Community |
Previous Message | Martin Bruset Solberg | 2015-02-02 16:55:28 | pg_xlog filling up under load |