Re: createdb confusion - Mailing list pgsql-general

From Mike Mascari
Subject Re: createdb confusion
Date
Msg-id 3B71E93C.CC13F7E9@mascari.com
Whole thread Raw
In response to createdb confusion  (newsreader@mediaone.net)
List pgsql-general
Well. I just did this by hand. I did this:

As postgres:

export PGDATA2=/opt/postgres
initlocation PGDATA2

As root, I stopped the postmaster (which was installed via RPMS):

/etc/rc.d/init.d/postgresql stop

In X-Term #1 as postgres:

export PGDATA2=/opt/postgres
postmaster -D /var/lib/pgsql/data

In X-Term #2 as postgres:

createdb mydb -D PGDATA2

And it worked. Apparently, you must define the environmental
variable used in the context of the postmaster session for it to
work.

Hope that helps,

Mike Mascari
mascarm@mascari.com

newsreader@mediaone.net wrote:
>
> Did that already.  No go.
>
> On Wed, Aug 08, 2001 at 08:48:52PM -0400, Mike Mascari wrote:
> > newsreader@mediaone.net wrote:
> > >
> >
> > export PGDATA2=/opt/postgres/data
> > initlocation PGDATA2
> > createdb -D PGDATA2 mydb
> >
> > I haven't created databases in alternate locations, so I'm just
> > going by the manual. ;-)

pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: createdb confusion
Next
From: Justin Clift
Date:
Subject: Re: Re: Mirroring the database?