Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0MB-0007Gc-1s for pgsql-admin@arkaria.postgresql.org; Thu, 20 Dec 2018 15:35:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga0M9-0005Zn-KK for pgsql-admin@arkaria.postgresql.org; Thu, 20 Dec 2018 15:35:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0M9-0005Ze-99 for pgsql-admin@lists.postgresql.org; Thu, 20 Dec 2018 15:35:25 +0000 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0M6-0005tJ-AU for pgsql-admin@lists.postgresql.org; Thu, 20 Dec 2018 15:35:24 +0000 Received: from firost (unknown [81.66.185.171]) (Authenticated sender: ioguix) by smtp1-g21.free.fr (Postfix) with ESMTPSA id 7800DB0055A; Thu, 20 Dec 2018 16:35:15 +0100 (CET) Date: Thu, 20 Dec 2018 16:35:14 +0100 From: "Jehan-Guillaume (ioguix) de Rorthais" To: Ron Cc: pgsql-admin@lists.postgresql.org Subject: Re: Shared data dir for multiple postgresql nodes Message-ID: <20181220163514.0f493bb8@firost> In-Reply-To: <6cf08d9a-9480-d396-d54d-908899a0d577@gmail.com> References: <6cf08d9a-9480-d396-d54d-908899a0d577@gmail.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 20 Dec 2018 09:28:26 -0600 Ron 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 :)