Re: Shared data dir for multiple postgresql nodes - Mailing list pgsql-admin

From Jehan-Guillaume (ioguix) de Rorthais
Subject Re: Shared data dir for multiple postgresql nodes
Date
Msg-id 20181220163514.0f493bb8@firost
Whole thread Raw
In response to Re: Shared data dir for multiple postgresql nodes  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-admin
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 :)



pgsql-admin by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Shared data dir for multiple postgresql nodes
Next
From: Alvaro Herrera
Date:
Subject: Re: Stats getting corrupted