pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Adding another cluster on same machine
8+ messages / 4 participants
[nested] [flat]

* Adding another cluster on same machine
@ 2020-12-04 06:27 Yambu <hyambu@gmail.com>
  2020-12-04 06:45 ` Re: Adding another cluster on same machine David G. Johnston <david.g.johnston@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Yambu @ 2020-12-04 06:27 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hi

Im trying to add a second cluster on the same machine, but im getting error
below,what could be the problem?

-bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
/var/lib/pgsql/10/data-log -p 5433
systemctl: invalid option -- 'D'
failed to find PGDATA setting in -D.service

regards

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
@ 2020-12-04 06:45 ` David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: David G. Johnston @ 2020-12-04 06:45 UTC (permalink / raw)
  To: Yambu <hyambu@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Thursday, December 3, 2020, Yambu <hyambu@gmail.com> wrote:

> Hi
>
> Im trying to add a second cluster on the same machine, but im getting
> error below,what could be the problem?
>
> -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
> /var/lib/pgsql/10/data-log -p 5433
> systemctl: invalid option -- 'D'
> failed to find PGDATA setting in -D.service
>
>
What is “postgresql-10-setup” ?

David J.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
@ 2020-12-04 13:34 ` Ron <ronljohnsonjr@gmail.com>
  2020-12-04 16:20   ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Ron @ 2020-12-04 13:34 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 12/4/20 12:27 AM, Yambu wrote:
> Hi
>
> Im trying to add a second cluster on the same machine, but im getting 
> error below,what could be the problem?
>
> -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D 
> /var/lib/pgsql/10/data-log -p 5433
> systemctl: invalid option -- 'D'
> failed to find PGDATA setting in -D.service

What distro (including version!) are you running?
How did you install Postgres?

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
@ 2020-12-04 16:20   ` Yambu <hyambu@gmail.com>
  2020-12-04 17:10     ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  2020-12-04 20:48     ` Re: Adding another cluster on same machine Jwiencek3 <jwiencek3@comcast.net>
  0 siblings, 2 replies; 8+ messages in thread

From: Yambu @ 2020-12-04 16:20 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hi

Centos 7
Postgres v10

yum install postgresql10-server

/usr/pgsql-10/bin/postgresql-10-setup initdb

systemctl enable postgresql-10.service
systemctl status  postgresql-10.service
systemctl start  postgresql-10.service

On Fri, Dec 4, 2020 at 3:34 PM Ron <ronljohnsonjr@gmail.com> wrote:

> On 12/4/20 12:27 AM, Yambu wrote:
> > Hi
> >
> > Im trying to add a second cluster on the same machine, but im getting
> > error below,what could be the problem?
> >
> > -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
> > /var/lib/pgsql/10/data-log -p 5433
> > systemctl: invalid option -- 'D'
> > failed to find PGDATA setting in -D.service
>
> What distro (including version!) are you running?
> How did you install Postgres?
>
> --
> Angular momentum makes the world go 'round.
>
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  2020-12-04 16:20   ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
@ 2020-12-04 17:10     ` Ron <ronljohnsonjr@gmail.com>
  2020-12-04 19:37       ` Re: Adding another cluster on same machine David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Ron @ 2020-12-04 17:10 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>


The problem *might* be that you have to do the initdb *after* "systemctl 
start  postgresql-10.service".

On 12/4/20 10:20 AM, Yambu wrote:
> Hi
>
> Centos 7
> Postgres v10
>
> yum install postgresql10-server
>
> /usr/pgsql-10/bin/postgresql-10-setup initdb
>
> systemctl enable postgresql-10.service
> systemctl status  postgresql-10.service
> systemctl start  postgresql-10.service
>
> On Fri, Dec 4, 2020 at 3:34 PM Ron <ronljohnsonjr@gmail.com 
> <mailto:ronljohnsonjr@gmail.com>> wrote:
>
>     On 12/4/20 12:27 AM, Yambu wrote:
>     > Hi
>     >
>     > Im trying to add a second cluster on the same machine, but im getting
>     > error below,what could be the problem?
>     >
>     > -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
>     > /var/lib/pgsql/10/data-log -p 5433
>     > systemctl: invalid option -- 'D'
>     > failed to find PGDATA setting in -D.service
>
>     What distro (including version!) are you running?
>     How did you install Postgres?
>
>     -- 
>     Angular momentum makes the world go 'round.
>
>

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  2020-12-04 16:20   ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 17:10     ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
@ 2020-12-04 19:37       ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: David G. Johnston @ 2020-12-04 19:37 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Fri, Dec 4, 2020 at 10:10 AM Ron <ronljohnsonjr@gmail.com> wrote:

>
> The problem *might* be that you have to do the initdb *after* "systemctl
> start  postgresql-10.service".
>

No.  You definitely need to initialize the database cluster before you try
starting it.

>
>> > -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
>> > /var/lib/pgsql/10/data-log -p 5433
>> > systemctl: invalid option -- 'D'
>> > failed to find PGDATA setting in -D.service
>>
>> This made-up command is the problem.

After some searching I found this:

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/master/non-common/postgres...

The section titled: "MULTIPLE POSTMASTERS (For the same PostgreSQL version)"

Though, if you don't care about systemd just ignore all the RPM-specific
stuff and follow the instructions in the PostgreSQL documentation.  IOW,
don't use "postgresql-10-setup".

David J.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  2020-12-04 16:20   ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
@ 2020-12-04 20:48     ` Jwiencek3 <jwiencek3@comcast.net>
  2020-12-04 21:12       ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Jwiencek3 @ 2020-12-04 20:48 UTC (permalink / raw)
  To: Yambu <hyambu@gmail.com>; +Cc: Ron <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

You need to copy the service file to /etc/systemd /system and give it a new name.   Edit the new file and change the environment variable to point to the new data directory.

You will need to change the port number in the Postgresql.conf file before starting the service.  Can’t have two clusters on the same server using the same port

Use system to to start the ‘new’ service .   

Sent from my iPad

> On Dec 4, 2020, at 10:20 AM, Yambu <hyambu@gmail.com> wrote:
> 
> 
> Hi
> 
> Centos 7
> Postgres v10
> 
> yum install postgresql10-server
> 
> /usr/pgsql-10/bin/postgresql-10-setup initdb
> 
> systemctl enable postgresql-10.service
> systemctl status  postgresql-10.service
> systemctl start  postgresql-10.service
> 
>> On Fri, Dec 4, 2020 at 3:34 PM Ron <ronljohnsonjr@gmail.com> wrote:
>> On 12/4/20 12:27 AM, Yambu wrote:
>> > Hi
>> >
>> > Im trying to add a second cluster on the same machine, but im getting 
>> > error below,what could be the problem?
>> >
>> > -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D 
>> > /var/lib/pgsql/10/data-log -p 5433
>> > systemctl: invalid option -- 'D'
>> > failed to find PGDATA setting in -D.service
>> 
>> What distro (including version!) are you running?
>> How did you install Postgres?
>> 
>> -- 
>> Angular momentum makes the world go 'round.
>> 
>> 

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Adding another cluster on same machine
  2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 13:34 ` Re: Adding another cluster on same machine Ron <ronljohnsonjr@gmail.com>
  2020-12-04 16:20   ` Re: Adding another cluster on same machine Yambu <hyambu@gmail.com>
  2020-12-04 20:48     ` Re: Adding another cluster on same machine Jwiencek3 <jwiencek3@comcast.net>
@ 2020-12-04 21:12       ` Yambu <hyambu@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Yambu @ 2020-12-04 21:12 UTC (permalink / raw)
  To: Jwiencek3 <jwiencek3@comcast.net>; +Cc: Ron <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Thank you all for your assistance, you have pointed me to great resources

On Fri, Dec 4, 2020 at 10:48 PM Jwiencek3 <jwiencek3@comcast.net> wrote:

> You need to copy the service file to /etc/systemd /system and give it a
> new name.   Edit the new file and change the environment variable to point
> to the new data directory.
>
> You will need to change the port number in the Postgresql.conf file before
> starting the service.  Can’t have two clusters on the same server using the
> same port
>
> Use system to to start the ‘new’ service .
>
> Sent from my iPad
>
> On Dec 4, 2020, at 10:20 AM, Yambu <hyambu@gmail.com> wrote:
>
> 
> Hi
>
> Centos 7
> Postgres v10
>
> yum install postgresql10-server
>
> /usr/pgsql-10/bin/postgresql-10-setup initdb
>
> systemctl enable postgresql-10.service
> systemctl status  postgresql-10.service
> systemctl start  postgresql-10.service
>
> On Fri, Dec 4, 2020 at 3:34 PM Ron <ronljohnsonjr@gmail.com> wrote:
>
>> On 12/4/20 12:27 AM, Yambu wrote:
>> > Hi
>> >
>> > Im trying to add a second cluster on the same machine, but im getting
>> > error below,what could be the problem?
>> >
>> > -bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D
>> > /var/lib/pgsql/10/data-log -p 5433
>> > systemctl: invalid option -- 'D'
>> > failed to find PGDATA setting in -D.service
>>
>> What distro (including version!) are you running?
>> How did you install Postgres?
>>
>> --
>> Angular momentum makes the world go 'round.
>>
>>
>>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2020-12-04 21:12 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 06:27 Adding another cluster on same machine Yambu <hyambu@gmail.com>
2020-12-04 06:45 ` David G. Johnston <david.g.johnston@gmail.com>
2020-12-04 13:34 ` Ron <ronljohnsonjr@gmail.com>
2020-12-04 16:20   ` Yambu <hyambu@gmail.com>
2020-12-04 17:10     ` Ron <ronljohnsonjr@gmail.com>
2020-12-04 19:37       ` David G. Johnston <david.g.johnston@gmail.com>
2020-12-04 20:48     ` Jwiencek3 <jwiencek3@comcast.net>
2020-12-04 21:12       ` Yambu <hyambu@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