Re: Problem starting two postgresql clusters on the same host

From: Michael Banck <michael(dot)banck(at)credativ(dot)de>
To: Ibrahim Shaame <ishaame(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Problem starting two postgresql clusters on the same host
Date: 2022-02-05 09:54:06
Message-ID: 61fe493f.1c69fb81.5e2db.903c@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, Feb 05, 2022 at 12:41:37PM +0100, Ibrahim Shaame wrote:
> I have created two postgresql clusters on the same host, which work
> perfectly when started individually and manually. But when putting them on
> start script, only one loads and the other fails. Any hint? My installation
> is postgresql 14.1 on Slackware 15 and my rc.postgresql looks like this:
>
> # Start PostgreSQL:
> postgresql_start() {
> if [ -x /data/apps/postgresql/pgsql141/bin/pg_ctl ]; then
> su - postgres -c "/data/apps/postgresql/pgsql141/bin/pg_ctl -D
> /data/apps/postgresql/pgsql141/data start &"
> su - postgres -c "/data/apps/postgresql/pgsql141/bin/pg_ctl -o "-p 5433"
> -D /data/apps/postgresql/pgsql141/data2 start & "

Is this verbatim, or a copy-pasto? You have four " in there, you need to
escape the "-p 5433" like \"-p 5433\" or else the command will stop at
-o".

Michael

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ibrahim Shaame 2022-02-05 11:41:37 Problem starting two postgresql clusters on the same host
Previous Message David G. Johnston 2022-02-04 01:03:49 Re: any impact to DML sql statements when checkpoint starting