Re: CentOS initd Script - Mailing list pgsql-general

From Scott Marlowe
Subject Re: CentOS initd Script
Date
Msg-id CAOR=d=2hODyfSgF7PvbzL_RM9KxB-W=BbDqRmSyzYLYa3sebig@mail.gmail.com
Whole thread Raw
In response to CentOS initd Script  (Kenaniah Cerny <kenaniah@gmail.com>)
Responses Re: CentOS initd Script
Re: CentOS initd Script
List pgsql-general
On Wed, Sep 12, 2012 at 12:41 AM, Kenaniah Cerny <kenaniah@gmail.com> wrote:
> Hi all,
>
> I would first like to thank everyone involved for all of the hard work that
> goes into the postgres and the RPMs.I have a small request:
>
> In the service script that gets installed to /etc/rc.d/init.d/, there is a
> hard-coded value for PGPORT. Would it be possible to have this variable and
> the corresponding -p flag set when calling postgres removed?
>
> Explicitly specifying the port flag causes the port setting of
> postgresql.conf to be ignored. When postgresql.conf does not have the port
> explicitly defined, postgres falls back on the value of PGPORT, and
> ultimately 5432 when PGPORT is not present in the environment.
>
> My main use case for this request is concurrently running multiple versions
> of postgresql on non-standard ports on the same box.

Your best bet for running > 1 versions and / or > 1 clusters of the
same version, is to run debian or any debian based distro.  You create
a new cluster like so:

pg_createcluster
Usage: /usr/bin/pg_createcluster [options] <version> <cluster name>

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')

While RHEL is a solid and reliable OS, it was never built to run > 1
version etc of pgsql easily.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?
Next
From: Scott Marlowe
Date:
Subject: Re: CentOS initd Script