Re: CentOS initd Script

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Kenaniah Cerny <kenaniah(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CentOS initd Script
Date: 2012-09-12 14:54:57
Message-ID: CAOR=d=2hODyfSgF7PvbzL_RM9KxB-W=BbDqRmSyzYLYa3sebig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 12, 2012 at 12:41 AM, Kenaniah Cerny <kenaniah(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2012-09-12 15:02:29 Re: CentOS initd Script
Previous Message Tom Lane 2012-09-12 14:47:03 Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?