pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Problem starting two postgresql clusters on the same host
3+ messages / 2 participants
[nested] [flat]
* Re: Problem starting two postgresql clusters on the same host
@ 2022-02-05 09:54 Michael Banck <michael.banck@credativ.de>
parent: Ibrahim Shaame <ishaame@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Banck @ 2022-02-05 09:54 UTC (permalink / raw)
To: Ibrahim Shaame <ishaame@gmail.com>; +Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Problem starting two postgresql clusters on the same host
@ 2022-02-05 11:41 Ibrahim Shaame <ishaame@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Ibrahim Shaame @ 2022-02-05 11:41 UTC (permalink / raw)
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
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 & "
fi
####
Incidentally, when I change to postgres user and run the command of the
second cluster in a terminal it runs perfectly. Otherwise if I source it in
a terminal, be root or postgres user I get an error message:
pg_ctl: no operation specified
Thanks in advance
Ibrahim Shaame
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Problem starting two postgresql clusters on the same host
@ 2022-02-05 12:06 Ibrahim Shaame <ishaame@gmail.com>
parent: Ibrahim Shaame <ishaame@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ibrahim Shaame @ 2022-02-05 12:06 UTC (permalink / raw)
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
Thank you Holger and others. That was it changed the in -p 5433 into one
quote and it works
Thanks
On Sat, Feb 5, 2022 at 12:41 PM Ibrahim Shaame <ishaame@gmail.com> 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 & "
> fi
>
> ####
>
> Incidentally, when I change to postgres user and run the command of the
> second cluster in a terminal it runs perfectly. Otherwise if I source it in
> a terminal, be root or postgres user I get an error message:
> pg_ctl: no operation specified
>
> Thanks in advance
> Ibrahim Shaame
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-02-05 12:06 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 11:41 Problem starting two postgresql clusters on the same host Ibrahim Shaame <ishaame@gmail.com>
2022-02-05 09:54 ` Michael Banck <michael.banck@credativ.de>
2022-02-05 12:06 ` Ibrahim Shaame <ishaame@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox