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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-admin by date

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