Re: Postgres architecture for multiple instances

Поиск
Список
Период
Сортировка
От Gavin Flower
Тема Re: Postgres architecture for multiple instances
Дата
Msg-id 54EAAFDD.9040201@archidevsys.co.nz
обсуждение исходный текст
Ответ на Re: Postgres architecture for multiple instances  (Samuel Smith <pgsql@net153.net>)
Список pgsql-general
On 23/02/15 17:21, Samuel Smith wrote:
> On 02/22/2015 01:53 PM, Scott Marlowe wrote:>
> > I'd run a debian based distro (Ubuntu or Debian work well) and use the
> > pg_* commands to create the clusters the same way. Gives you the
> > maximum separation for clients.
> >
> > pg_createcluster
> >
> > Usage: /usr/bin/pg_createcluster [options] <version> <cluster name>
> > [-- <initdb options>]
> >
> > Options:
> >    -u <uid>      cluster owner and superuser (default: 'postgres')
> >    -g <gid>      group for data files (default: primary group of owner)
> >    -d <dir>      data directory (default:
> > /var/lib/postgresql/<version>/<cluster name>)
> >    -s <dir>      socket directory (default: /var/run/postgresql for
> clusters
> >                  owned by 'postgres', /tmp for other clusters)
> >    -l <dir>      path to desired log file (default:
> > /var/log/postgresql/postgresql-<version>-<cluster>.log)
> >    --locale <encoding>
> >                  set cluster locale (default: inherit from environment)
> >    --lc-collate/ctype/messages/monetary/numeric/time <locale>
> >                  like --locale, but only set for a particular category
> >    -e <encoding> Default encoding (default: derived from locale)
> >    -p <port>     port number (default: next free port starting from
> 5432)
> >    --start       start the cluster after creating it
> >    --start-conf auto|manual|disabled
> >                  Set automatic startup behaviour in start.conf
> (default: 'auto')
> >    --createclusterconf=file alternative createcluster.conf to use
> >    --environment=file alternative environment file to use
> >    <initdb options> other options to pass to initdb
> >
> > Just use -u and -d to put it where you want, -l to setup logging and
> > -p to set the port you want.
> >
>
> I am stuck with redhat as the OS so I'll only have initdb. But this is
> a good point. I assume there is nothing wrong with having multiple
> postgres instances (clusters) all running under a single postgres user
> on different ports on the same machine?
> But then what is the best way to handle connecting to an individual
> cluster  (local only for admin purposes) with psql? Doesn't look like
> I could go by the cluster name alone, but would have to manage
> (memorize) connections by port number?
>
> Thanks,
> Sam
>
>
pg_archivecleanup
pg_basebackup
pg_config
pg_controldata
pg_ctl
pg_dump
pg_dumpall
pg_isready
pg_receivexlog
pg_recvlogical
pg_resetxlog
pg_restore
pg_standby
pg_test_fsync
pg_test_timing
pg_upgrade
pg_xlogdump

Are the pg_* commands I found on my Fedora 21 box - if its of any help!


Cheers,
Gavn


В списке pgsql-general по дате отправления:

Предыдущее
От: Samuel Smith
Дата:
Сообщение: Re: Postgres architecture for multiple instances
Следующее
От: Novák, Petr
Дата:
Сообщение: Re: Postgres architecture for multiple instances