pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Shared data dir for multiple postgresql nodes
10+ messages / 7 participants
[nested] [flat]

* Shared data dir for multiple postgresql nodes
@ 2018-12-20 08:41 Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 09:05 ` Re: Shared data dir for multiple postgresql nodes Guillaume Lelarge <guillaume@lelarge.info>
  2018-12-20 09:08 ` Re: [External] Shared data dir for multiple postgresql nodes Vijaykumar Jain <vjain@opentable.com>
  2018-12-20 11:43 ` Re: Shared data dir for multiple postgresql nodes Shreeyansh Dba <shreeyansh2014@gmail.com>
  2018-12-20 15:28 ` Re: Shared data dir for multiple postgresql nodes Ron <ronljohnsonjr@gmail.com>
  0 siblings, 4 replies; 10+ messages in thread

From: Prince Pathria @ 2018-12-20 08:41 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi,
I'm asking this out of curiosity, if I have 2 postgres nodes on same server,
1. listening on port 5432
2. listening on port 5433

What issue's I might face if I do it like this? Assuming I'm doing this for
multimaster approach.

pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start

pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start


Happy to help :)
Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
@ 2018-12-20 09:05 ` Guillaume Lelarge <guillaume@lelarge.info>
  3 siblings, 0 replies; 10+ messages in thread

From: Guillaume Lelarge @ 2018-12-20 09:05 UTC (permalink / raw)
  To: Prince Pathria <prince.pathria@goevive.com>; +Cc: pgsql-admin@lists.postgresql.org

Le jeu. 20 déc. 2018 à 09:41, Prince Pathria <prince.pathria@goevive.com> a
écrit :

> Hi,
> I'm asking this out of curiosity, if I have 2 postgres nodes on same
> server,
> 1. listening on port 5432
> 2. listening on port 5433
>
> What issue's I might face if I do it like this? Assuming I'm doing this
> for multimaster approach.
>
> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>
> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>
>
Corruption is probably the first thing you'll have to assume.


-- 
Guillaume

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

* Re: [External] Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
@ 2018-12-20 09:08 ` Vijaykumar Jain <vjain@opentable.com>
  2018-12-20 09:09   ` Re: [External] Shared data dir for multiple postgresql nodes Vijaykumar Jain <vjain@opentable.com>
  3 siblings, 1 reply; 10+ messages in thread

From: Vijaykumar Jain @ 2018-12-20 09:08 UTC (permalink / raw)
  To: Prince Pathria <prince.pathria@goevive.com>; +Cc: pgsql-admin@lists.postgresql.org

then what is the point of multi master :)
if the server goes down, both go down.

other than that, having multiple servers may act as noisy neighbors to each
other.


Regards,
Vijay


On Thu, Dec 20, 2018 at 2:11 PM Prince Pathria <prince.pathria@goevive.com>
wrote:

> Hi,
> I'm asking this out of curiosity, if I have 2 postgres nodes on same
> server,
> 1. listening on port 5432
> 2. listening on port 5433
>
> What issue's I might face if I do it like this? Assuming I'm doing this
> for multimaster approach.
>
> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>
> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>
>
> Happy to help :)
> Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com
>

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

* Re: [External] Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 09:08 ` Re: [External] Shared data dir for multiple postgresql nodes Vijaykumar Jain <vjain@opentable.com>
@ 2018-12-20 09:09   ` Vijaykumar Jain <vjain@opentable.com>
  2018-12-20 09:18     ` Re: [External] Shared data dir for multiple postgresql nodes Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Vijaykumar Jain @ 2018-12-20 09:09 UTC (permalink / raw)
  To: Prince Pathria <prince.pathria@goevive.com>; +Cc: pgsql-admin@lists.postgresql.org

ah i did not see that -D /data/postgres on both.

yes on this.
--Corruption is probably the first thing you'll have to assume.

Regards,
Vijay


On Thu, Dec 20, 2018 at 2:38 PM Vijaykumar Jain <vjain@opentable.com> wrote:

> then what is the point of multi master :)
> if the server goes down, both go down.
>
> other than that, having multiple servers may act as noisy neighbors to
> each other.
>
>
> Regards,
> Vijay
>
>
> On Thu, Dec 20, 2018 at 2:11 PM Prince Pathria <prince.pathria@goevive.com>
> wrote:
>
>> Hi,
>> I'm asking this out of curiosity, if I have 2 postgres nodes on same
>> server,
>> 1. listening on port 5432
>> 2. listening on port 5433
>>
>> What issue's I might face if I do it like this? Assuming I'm doing this
>> for multimaster approach.
>>
>> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>>
>> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>>
>>
>> Happy to help :)
>> Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com
>>
>

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

* Re: [External] Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 09:08 ` Re: [External] Shared data dir for multiple postgresql nodes Vijaykumar Jain <vjain@opentable.com>
  2018-12-20 09:09   ` Re: [External] Shared data dir for multiple postgresql nodes Vijaykumar Jain <vjain@opentable.com>
@ 2018-12-20 09:18     ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Achilleas Mantzios @ 2018-12-20 09:18 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 20/12/18 11:09 π.μ., Vijaykumar Jain wrote:
> ah i did not see that -D /data/postgres on both.
>
> yes on this.
> --Corruption is probably the first thing you'll have to assume.

Most likely 2nd PostgreSQL "master" will not even start.

>
> Regards,
> Vijay
>
>
> On Thu, Dec 20, 2018 at 2:38 PM Vijaykumar Jain <vjain@opentable.com <mailto:vjain@opentable.com>> wrote:
>
>     then what is the point of multi master :)
>     if the server goes down, both go down.
>
>     other than that, having multiple servers may act as noisy neighbors to each other.
>
>
>     Regards,
>     Vijay
>
>
>     On Thu, Dec 20, 2018 at 2:11 PM Prince Pathria <prince.pathria@goevive.com <mailto:prince.pathria@goevive.com>> wrote:
>
>         Hi,
>         I'm asking this out of curiosity, if I have 2 postgres nodes on same server,
>         1. listening on port 5432
>         2. listening on port 5433
>
>         What issue's I might face if I do it like this? Assuming I'm doing this for multimaster approach.
>
>         |pg_ctl -D /data/postgres-o "-p 5432"-l /var/log/pg1start|
>
>         |
>
>         |pg_ctl -D /data/postgres-o "-p 5433"-l /var/log/pg2 start||
>
>         Happy to help :)
>         Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com <http://goevive.com;
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
@ 2018-12-20 11:43 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
  2018-12-20 12:23   ` Re: Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  3 siblings, 1 reply; 10+ messages in thread

From: Shreeyansh Dba @ 2018-12-20 11:43 UTC (permalink / raw)
  To: Prince Pathria <prince.pathria@goevive.com>; +Cc: pgsql-admin@lists.postgresql.org

Hi Prince,
pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 startpg_ctl -D
/data/postgres -o "-p 5433" -l /var/log/pg2 start

The first thing you can not run the same instance with a different port in
the single data directory, as we suspect you are trying to run two
instances with the different port in the same data directory.
However, you can run two DB instance on the same server using different
data directory with a different port, you may face below issue if you are
planning to keep two DB instance on the same server.

 Application, disk IO performance will decrease
 Due to a cause of any disaster both the instance will crash.
 Data loss,downtime,data corruption etc..

Thanks & Regards,

*Shreeyansh DBA Team*Phone: +91-9552687400
www.shreeyansh.com


On Thu, Dec 20, 2018 at 2:11 PM Prince Pathria <prince.pathria@goevive.com>
wrote:

> Hi,
> I'm asking this out of curiosity, if I have 2 postgres nodes on same
> server,
> 1. listening on port 5432
> 2. listening on port 5433
>
> What issue's I might face if I do it like this? Assuming I'm doing this
> for multimaster approach.
>
> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>
> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>
>
> Happy to help :)
> Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com
>

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 11:43 ` Re: Shared data dir for multiple postgresql nodes Shreeyansh Dba <shreeyansh2014@gmail.com>
@ 2018-12-20 12:23   ` Prince Pathria <prince.pathria@goevive.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Prince Pathria @ 2018-12-20 12:23 UTC (permalink / raw)
  To: Shreeyansh Dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

Thanks everyone!

Happy to help :)
Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com


On Thu, Dec 20, 2018 at 5:13 PM Shreeyansh Dba <shreeyansh2014@gmail.com>
wrote:

> Hi Prince,
> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 startpg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>
> The first thing you can not run the same instance with a different port in
> the single data directory, as we suspect you are trying to run two
> instances with the different port in the same data directory.
> However, you can run two DB instance on the same server using different
> data directory with a different port, you may face below issue if you are
> planning to keep two DB instance on the same server.
>
>  Application, disk IO performance will decrease
>  Due to a cause of any disaster both the instance will crash.
>  Data loss,downtime,data corruption etc..
>
> Thanks & Regards,
>
> *Shreeyansh DBA Team*Phone: +91-9552687400
> www.shreeyansh.com
>
>
> On Thu, Dec 20, 2018 at 2:11 PM Prince Pathria <prince.pathria@goevive.com>
> wrote:
>
>> Hi,
>> I'm asking this out of curiosity, if I have 2 postgres nodes on same
>> server,
>> 1. listening on port 5432
>> 2. listening on port 5433
>>
>> What issue's I might face if I do it like this? Assuming I'm doing this
>> for multimaster approach.
>>
>> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>>
>> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>>
>>
>> Happy to help :)
>> Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com
>>
>

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
@ 2018-12-20 15:28 ` Ron <ronljohnsonjr@gmail.com>
  2018-12-20 15:32   ` Re: Shared data dir for multiple postgresql nodes Guillaume Lelarge <guillaume@lelarge.info>
  2018-12-20 15:35   ` Re: Shared data dir for multiple postgresql nodes Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
  3 siblings, 2 replies; 10+ messages in thread

From: Ron @ 2018-12-20 15:28 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 12/20/18 2:41 AM, Prince Pathria wrote:
> Hi,
> I'm asking this out of curiosity, if I have 2 postgres nodes on same server,
> 1. listening on port 5432
> 2. listening on port 5433
>
> What issue's I might face if I do it like this? Assuming I'm doing this 
> for multimaster approach.
>
> |pg_ctl -D /data/postgres-o "-p 5432"-l /var/log/pg1start|
> |
> |pg_ctl -D /data/postgres-o "-p 5433"-l /var/log/pg2 start||

I don't think Postgres will even let you install the second node in the same 
directory.

Also, you should name the directories /postgres/data Postgres expects to be 
installed in a directory named "data".

In fact, if you install Postgres from postgresql.org packages, it'll install 
it in "X.Y/data", where X is the major version number, and Y is the minor 
version number.


-- 
Angular momentum makes the world go 'round.

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 15:28 ` Re: Shared data dir for multiple postgresql nodes Ron <ronljohnsonjr@gmail.com>
@ 2018-12-20 15:32   ` Guillaume Lelarge <guillaume@lelarge.info>
  1 sibling, 0 replies; 10+ messages in thread

From: Guillaume Lelarge @ 2018-12-20 15:32 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

Le jeu. 20 déc. 2018 à 16:28, Ron <ronljohnsonjr@gmail.com> a écrit :

> On 12/20/18 2:41 AM, Prince Pathria wrote:
>
> Hi,
> I'm asking this out of curiosity, if I have 2 postgres nodes on same
> server,
> 1. listening on port 5432
> 2. listening on port 5433
>
> What issue's I might face if I do it like this? Assuming I'm doing this
> for multimaster approach.
>
> pg_ctl -D /data/postgres -o "-p 5432" -l /var/log/pg1 start
>
> pg_ctl -D /data/postgres -o "-p 5433" -l /var/log/pg2 start
>
>
> I don't think Postgres will even let you install the second node in the
> same directory.
>
> Also, you should name the directories /postgres/data Postgres expects to
> be installed in a directory named "data".
>
>
No, the directory's name doesn't matter.

In fact, if you install Postgres from postgresql.org packages, it'll
> install it in "X.Y/data", where X is the major version number, and Y is
> the minor version number.
>
>
>

-- 
Guillaume.

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

* Re: Shared data dir for multiple postgresql nodes
  2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
  2018-12-20 15:28 ` Re: Shared data dir for multiple postgresql nodes Ron <ronljohnsonjr@gmail.com>
@ 2018-12-20 15:35   ` Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
  1 sibling, 0 replies; 10+ messages in thread

From: Jehan-Guillaume (ioguix) de Rorthais @ 2018-12-20 15:35 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

On Thu, 20 Dec 2018 09:28:26 -0600
Ron <ronljohnsonjr@gmail.com> wrote:

> On 12/20/18 2:41 AM, Prince Pathria wrote:
> > Hi,
> > I'm asking this out of curiosity, if I have 2 postgres nodes on same server,
> > 1. listening on port 5432
> > 2. listening on port 5433
> >
> > What issue's I might face if I do it like this? Assuming I'm doing this 
> > for multimaster approach.
> >
> > |pg_ctl -D /data/postgres-o "-p 5432"-l /var/log/pg1start|
> > |
> > |pg_ctl -D /data/postgres-o "-p 5433"-l /var/log/pg2 start||  
> 
> I don't think Postgres will even let you install the second node in the same 
> directory.

Well, with little insanity, you could. I already faced some corruptions
based on this recipe because of bad architectures. First easy situation to
imagine: shared rw storage with autofailover and no fencing.

Shake, wait and observe.

> Also, you should name the directories /postgres/data Postgres expects to be 
> installed in a directory named "data".

PostgreSQL does not expect such thing...or maybe I don't understand what you
mean.

> In fact, if you install Postgres from postgresql.org packages, it'll install 
> it in "X.Y/data", where X is the major version number, and Y is the minor 
> version number.

This is mostly packager decision...and a good one in fact :)





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


end of thread, other threads:[~2018-12-20 15:35 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20 08:41 Shared data dir for multiple postgresql nodes Prince Pathria <prince.pathria@goevive.com>
2018-12-20 09:05 ` Guillaume Lelarge <guillaume@lelarge.info>
2018-12-20 09:08 ` Vijaykumar Jain <vjain@opentable.com>
2018-12-20 09:09   ` Vijaykumar Jain <vjain@opentable.com>
2018-12-20 09:18     ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-12-20 11:43 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2018-12-20 12:23   ` Prince Pathria <prince.pathria@goevive.com>
2018-12-20 15:28 ` Ron <ronljohnsonjr@gmail.com>
2018-12-20 15:32   ` Guillaume Lelarge <guillaume@lelarge.info>
2018-12-20 15:35   ` Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>

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