Skip site navigation (1) Skip section navigation (2)

Re: starting postgres with several Data directories

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Julius T <julius(at)nsoft(dot)lt>, pgsql-admin(at)postgresql(dot)org
Subject: Re: starting postgres with several Data directories
Date: 2009-12-21 21:46:38
Message-ID: d3ab2ec80912211346m57a9a0d6n43ed7636c67a7584@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Mon, Dec 21, 2009 at 4:35 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Mon, Dec 21, 2009 at 2:26 PM, Scott Mead
> <scott(dot)lists(at)enterprisedb(dot)com> wrote:
> >
> > On Mon, Dec 21, 2009 at 4:17 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> > wrote:
> >>
>
>
> Yeah, I create a different "admin" account for each one, that has the
> PGPORT and stuff already set, and setup pg_hba.conf to reject the
> admin accounts from other instances so I don't do anything too stupid.
>

The other useful trick is to change set your psql prompt (via .psqlrc) so
that it shows which port the db you're logged into is listening on:

\set PROMPT1 '%/:%>=%# '

This will give you a prompt of:

postgres:5432=#

Take a look at http://www.postgresql.org/docs/8.3/static/app-psql.html for
more prompt options.


--Scott

In response to

Responses

pgsql-admin by date

Next:From: Julius TuskenisDate: 2009-12-22 07:03:58
Subject: Re: starting postgres with several Data directories
Previous:From: Scott MarloweDate: 2009-12-21 21:35:15
Subject: Re: starting postgres with several Data directories

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group