Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuHPr-00721M-T6 for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 20:50:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tuHPp-001iaY-F3 for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 20:50:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuHPp-001iYJ-28 for pgsql-general@lists.postgresql.org; Mon, 17 Mar 2025 20:50:29 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuHPl-003R7e-0Q for pgsql-general@postgresql.org; Mon, 17 Mar 2025 20:50:28 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3fa58dc37c5so3009108b6e.1 for ; Mon, 17 Mar 2025 13:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742244624; x=1742849424; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ln25UHdzAzDCA+T+RjevK+1/3BixDHssczC4/UOKI1Y=; b=CBqLtZAqbX+vvQlFsK2paItJtEQLGGzS6aca49yqmWjQQKftw+xZFOrSc4SyTLFcl9 LsYlNUGljJjGNqj/mAoyZptyNQ9g5NQErjJbfOUr1WZi3Cm+3lDZfBw9bkBrPm1ApjkA 5u31T/ZM7HdHFLMaNGyjJHSelqUsSFm43fkF9G6EP3L65nW/82GYCiIxEpPXEzrDOvoQ H6ET9ws1MGmAJFs19aPoQsuKMj0mnIJe20VadQiZze/9myXTFNSaBhCdsz3r/IRKLVBq xLWBe+G2MgxWNpx1MugWEw8DLF6AgEkM5zS55SwEyfmNa4JmxLiEKqB8DwULdB0XMosB m1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742244624; x=1742849424; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ln25UHdzAzDCA+T+RjevK+1/3BixDHssczC4/UOKI1Y=; b=b1dEcAf0Sw5MbmbYdAz2WWLlUBQyuVXRMzjd+25J4+J09O366ln0gBR0yXbvj6Qc8i IVg2cvUgwCXJ6b1sTeq/9LpsJLTzU3mMTgv5cQUDFZC+iUGEoHU9oMFPHPlQIu49wW1N gQlRxO83oMRKX070c0e3ltiqqOcC7yrrxKhQ0HuJMDGj0no73pnIPJ51tXPdaLLZS7hv 0TzkKJjMD56qU01PJckCOyE9wjpzvlpN552cHEpxP7i0IPkJwNqlhbatyFtza9lPEnvS 6/oJHmJf12uD6BAjeFDCnqmRMqbBYVOOvbu124DCD0M3TlAxPeNyqThDhotatRz4/U51 w8Cw== X-Gm-Message-State: AOJu0YxouKHO+hw9WEuNuCGVBeDQHn4iH8Bdz/LIv+Fl2BfpAT9LEWMH H/dfY1RcH02JUSOzEQK1qB0EQlUmfKs3C85xUsvysFcorlSRoHV0WqqsoSy5D7oNxytndMtiEa5 ySRd5cQIs5IQvSmAYqO/6g5vTnLha2A== X-Gm-Gg: ASbGncubCdGaT+sBkPC2Nvs0SXPGbdsGcGdUobxV7jovRMB90dJw/2ndhOFyPdjcP+6 GyojP0/iuPAGzeFJQsrsk9PCGgX4us+f9CD5fYts+gLauvkjci2SIvZk7EHlClQKZ7kZvbtSI+3 LQWlAjsxk+SxjlXdmBoXqTKDOqz0VCDn83/iFbtLWN6cK5OcZq+MaIx8hReBWX X-Google-Smtp-Source: AGHT+IGPs7cqshLShAj9/38N5XstX8GhpG9+/49UIktAS5lcst4gg0R23DDj4F6yfLR8gOYZgAOU2UnK/+45QJzKjPw= X-Received: by 2002:a05:6808:1903:b0:3f9:28b9:702f with SMTP id 5614622812f47-3fea24659b6mr608382b6e.5.1742244624405; Mon, 17 Mar 2025 13:50:24 -0700 (PDT) MIME-Version: 1.0 References: <7002449259b582723ed7e041a7f0de116b48ad4d.camel@cybertec.at> <66585a0d3b617bc2cba8ebbe3f0a479bee9c6324.camel@cybertec.at> In-Reply-To: <66585a0d3b617bc2cba8ebbe3f0a479bee9c6324.camel@cybertec.at> From: Ron Johnson Date: Mon, 17 Mar 2025 16:50:13 -0400 X-Gm-Features: AQ5f1JoB6x8iimYcos9D1nkTiYaS_IBj99OYCLINrCwwoQL_dMC9aCCJwTGkC38 Message-ID: Subject: Re: Creating a new database on a different file system To: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="000000000000f31f5006308fef7f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f31f5006308fef7f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 17, 2025 at 4:30=E2=80=AFPM Laurenz Albe wrote: > On Mon, 2025-03-17 at 14:33 -0400, Ron Johnson wrote: > > On Mon, Mar 17, 2025 at 11:18=E2=80=AFAM Laurenz Albe > wrote: > > > On Mon, 2025-03-17 at 15:51 +0100, Luca Ferrari wrote: > > > > On Mon, Mar 17, 2025 at 3:49=E2=80=AFPM Ian Dauncey < > Ian.Dauncey@bankzero.co.za> wrote: > > > > > We have created a few databases on the file system defined in the > postgresql.conf, > > > > > but now I would like to create another database within the same > cluster but on a > > > > > different file system. > > > > > > > > > > Is this possible and if so, how do we go about it. > > > > > > > > create a tablespace on the filesystem you want to use, and then > create > > > > the database adding the `WITH TABLESPACE` clause. > > > > See > > > > > > That is an option, but I would recommend to create a new database > cluster > > > on the new file system rather than creating a tablespace. > > > > That of course requires using another port, which can be tricky in a > company that by > > default closes all firewall ports at the network switch level, and wher= e > you must > > enumerate every server/subnet ("Rejected. Subnet range too broad!") tha= t > needs access > > to the new port, it takes time for requests for new port openings to be > approved > > ("Rejected. We don't recognize 5433!") and then implemented. > > > > Much easier to use a tablespace. > > *shrug* Sure, there are entities that think that security and > professionalism can be > measured in how difficult you are making everybody's life. If rules and > regulations > are in the way of choosing the best solution, you have to go for the > second best one. > Things are what they are. A listener (like what SQL Server uses) on port 5432 that looks at a connection, determines which instance it's asking for, and then redirects the connection to it. would be useful. How? By enabling multiple instances all externally viewable on 5432, one can run PgBackRest individually for each database instead of for *every* database. Role management would become more complicated, but *how much* more complicated is site-dependent. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000f31f5006308fef7f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Mar 17, 2025 at 4:30=E2=80=AFPM L= aurenz Albe <laurenz.albe@cy= bertec.at> wrote:
On Mon, 2025-03-17 at= 14:33 -0400, Ron Johnson wrote:
> On Mon, Mar 17, 2025 at 11:18=E2=80=AFAM Laurenz Albe <laurenz.albe@cybertec.at<= /a>> wrote:
> > On Mon, 2025-03-17 at 15:51 +0100, Luca Ferrari wrote:
> > > On Mon, Mar 17, 2025 at 3:49=E2=80=AFPM Ian Dauncey <
Ian.Dauncey@ban= kzero.co.za> wrote:
> > > > We have created a few databases on the file system defi= ned in the postgresql.conf,
> > > > but now I would like to create another database within = the same cluster but on a
> > > > different file system.
> > > >
> > > > Is this possible and if so, how do we go about it.
> > >
> > > create a tablespace on the filesystem you want to use, and t= hen create
> > > the database adding the `WITH TABLESPACE` clause.
> > > See <https://www.postg= resql.org/docs/17/sql-createtablespace.html>
> >
> > That is an option, but I would recommend to create a new database= cluster
> > on the new file system rather than creating a tablespace.
>
> That of course requires using another port, which can be tricky in a c= ompany that by
> default closes all firewall ports at the network switch level, and whe= re you must
> enumerate every server/subnet ("Rejected. Subnet range too broad!= ") that needs access
> to the new port, it takes time for requests for new port openings to b= e approved
> ("Rejected. We don't recognize 5433!") and then implemen= ted.
>
> Much easier to use a tablespace.

*shrug* Sure, there are entities that think that security and professionali= sm can be
measured in how difficult you are making everybody's life.=C2=A0 If rul= es and regulations
are in the way of choosing the best solution, you have to go for the second= best one.

Things are what they are.

A listener (like what SQL Server uses) on port 5432 = that looks at a connection, determines which instance it's asking for, = and then redirects the connection to it. would be useful.

How?=C2=A0 By enabling multiple instances all externally viewable o= n 5432, one can run PgBackRest individually for each database instead of fo= r every=C2=A0database.=C2=A0 Role management would become more compl= icated, but how much=C2=A0more complicated is site-dependent.
<= div>
--
Death to <Reda= cted>, and butter sauce.
Don't boil me, I'm still alive.
=
<Redacted> lobster!
--000000000000f31f5006308fef7f--