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 1tuFLD-006AKy-U5 for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 18:37:36 +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 1tuFLC-00HSDz-Kn for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 18:37:34 +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 1tuFHs-00HMYp-66 for pgsql-general@lists.postgresql.org; Mon, 17 Mar 2025 18:34:08 +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 1tuFHo-003PxX-1Y for pgsql-general@postgresql.org; Mon, 17 Mar 2025 18:34:07 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3f556b90790so1321700b6e.0 for ; Mon, 17 Mar 2025 11:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742236443; x=1742841243; 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=XPr+mPGRH4HcEO1TZB8HHsvjhO5RyYhAK9C53nQXsu8=; b=IMcZM7QXOSxW1pzTlgwfzRpBHc5me7+j6hMMgqHCFNjOmbUDkj9vHZw+fBrEQ3P8sz lKuC0Y7KERKmY+sENfB394zxXL4WHkr2WHu+moHoTX+Xsbyxud9zruMuYxY3rFBobo32 tRvWRSNsDZn1Gv3KWjSC3+JGR5ZGIGa8hBPSJC4Jtxmv0Nkv37lNs5z1scEejsDCinqg EbWEZwL2dgB3uSGeH/3BSoYMfbI6vXF0h0wmu6wTKqFIgF/1HPhL0rabPNhi6g8IrRCe Mi6f+LktHrEZQXza81s2LpCFe4y2FjFtbZRSuUnk0JdGCK0ATyRGX60+DZFeUyFmLxgz K50g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236443; x=1742841243; 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=XPr+mPGRH4HcEO1TZB8HHsvjhO5RyYhAK9C53nQXsu8=; b=QQD9Fnc/8m037h/qyUh+zh5SSsulvM/8JSWj/6f09cJgpXXDjRikKcbthflpZp2yAM On8jv2ARg5dTsFrcurUptQUBgsxG8R0tCK9tE/gD8z92BbUEZlkZJLzxn586KBUBJpgD tkAhgB1/nRNTNslUFvwM+XcUwVC1JGcEeccmiLnAye3zThNMHdPGgapBXAsNn7PPoANL w3giZu6KpUKiJXRv12HAe/H8bCqYVPvuMfyC0lr8XNb5kAxgqdOFUGODNBMJVXu0xLCs 3GFx4Z4pQH25bNECYguaL1Nxlzisdyyv6s4S0cSjbBlUl3fPGAZfy+zaYREWUMXngjI7 DR8g== X-Gm-Message-State: AOJu0YzVvpARj8jAJ5JA4ox4s0TyKh9q6Lkcoqtyk2ygiCZUs1S1sSd8 eBDpf05z6eSYla8Nar/qM79YOdeHahRO7Ka6/Ne/B+sZBOfa2TRtIB0D+pxDytaHBnt+o4QJ7I0 F9eOXGBYY6ywWHZzUll9Vn0/WnCyT/w== X-Gm-Gg: ASbGncsSRKbxC2vsYzAI7Jmo/K+9trqo9+TcNg/8EUWNQC7m2yNkQqreff0niDI3kUN y3Ef2evtZO3iJ5Y5KyB9mGvHIUFx8BwfHR3NVFYPY+ryvmrkdY6KQY7r8oC67Ov5W45WaQGlvHI dXWxRAkmctG9MwHp1eo+0SW8L5icqn+d+0GO9huA== X-Google-Smtp-Source: AGHT+IEYB21SQrHXq6BSXy1BLk/18DucJdRKXSbBfEQlxk806ST00R7MaIXfgBVDeMz6J9exte8THnC2EkGhEZksMo8= X-Received: by 2002:a05:6808:2205:b0:3f8:30c1:cca7 with SMTP id 5614622812f47-3fdee181dadmr8489318b6e.8.1742236443044; Mon, 17 Mar 2025 11:34:03 -0700 (PDT) MIME-Version: 1.0 References: <7002449259b582723ed7e041a7f0de116b48ad4d.camel@cybertec.at> In-Reply-To: <7002449259b582723ed7e041a7f0de116b48ad4d.camel@cybertec.at> From: Ron Johnson Date: Mon, 17 Mar 2025 14:33:52 -0400 X-Gm-Features: AQ5f1JrsDD2jPp4O1NN65rQ9YVt3fZzDaFXyImsjhqJZpXRcmLmmEJ6mlucH2qI Message-ID: Subject: Re: Creating a new database on a different file system To: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000004d729f06308e087c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004d729f06308e087c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 > 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 where 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 be approved ("Rejected. We don't recognize 5433!") and then implemented. Much easier to use a tablespace. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000004d729f06308e087c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Mar 17, 2025 at 11:18=E2=80=AFAM = Laurenz Albe <laurenz.albe@c= ybertec.at> wrote:
On Mon, 2025-03-17 a= t 15:51 +0100, Luca Ferrari wrote:
> On Mon, Mar 17, 2025 at 3:49=E2=80=AFPM Ian Dauncey <Ian.Dauncey@bankzero.co.z= a> 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 c= luster 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 <https://www.postgresql.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.
<= div>
That of course requires using another port, which can be= tricky in a company that by default closes all firewall ports at the netwo= rk switch level, and where you must enumerate every server/subnet ("Re= jected. Subnet range too broad!") that needs access to the new port, i= t takes time for requests for new port openings to be approved ("Rejec= ted. We don't recognize 5433!") and then implemented.
Much easier to use a tablespace.

--
Death to <Redacted>, and butter sa= uce.
Don't boil me, I'm still alive.
<Redacted&= gt; lobster!
--0000000000004d729f06308e087c--