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 1tuBqJ-004pcE-5P for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 14:53:27 +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 1tuBqH-00E0az-RY for pgsql-general@arkaria.postgresql.org; Mon, 17 Mar 2025 14:53:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuBp3-00DwGA-V6 for pgsql-general@lists.postgresql.org; Mon, 17 Mar 2025 14:52:09 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuBp2-003Kzn-0M for pgsql-general@postgresql.org; Mon, 17 Mar 2025 14:52:09 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-855fc51bdfcso173744839f.0 for ; Mon, 17 Mar 2025 07:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742223127; x=1742827927; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y5z8K01OJtHuJEHUwNWb5kkONqOk4Opn7Jp0VcYmBj0=; b=i2n+cekVpywCFFB4YV+EwAFGvdzoljLBB6W/E49o0TVjbooSAlxqfJhvqqfQiB66y8 fCIdWEg+b9eEDjAGs5uX5QGLtf0EYpCPKeYfy1p7ly65ZHk0qjdEK4s41CyV/yphijzG ofJp3GqfOMTDX4CofoY5wsgOaupJR/HrMLY4vNVeIi0H5cIq6hhvOJdPLJLuOPyOZ1pe xunBVEERasOUv8ypQ4Qy0l5g3DLWYEKzmv97H9Sha4AhmTIJR+o2gOSffYe8Ank3xsA7 pxeMnbIypwYGsD5RCjC23nJe+6p3bgtseA4Y/dIaFwzSJxf43qfO9sKxbeKe6q70s3UV HHiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742223127; x=1742827927; h=cc: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=y5z8K01OJtHuJEHUwNWb5kkONqOk4Opn7Jp0VcYmBj0=; b=xTh0bNldtA0laxXXzQlrqdNsKfowwYZ88IXu2KxkoRBIF4ipSDML9J+8qsleT0C5Qo 6nNeRvrUgKSx0eBYUh0LEC8a/P+Xsos164wLMn9pJTZcwAAfsZb8OSLWLuyG94vHjxDA sQKIC+XF10eC77drnLnyATae7Twr3fC3GcTtr3Z09IQQK89S/Y7/4EQv/Xa1MEcCErfX KJAWYV88UqcasMzDeMcHGpZPJG7ae2LeTUfK00d6R/Y0Wpg6r/5Tu42I7Y3zwekMPpUr 2JwCPx0M/Tg7wLqgR2jmSCqhFnEYhsgPqTdeleg/tyh0vIW+aq1SpW7qhQHAzqzwKs6m S9Yg== X-Gm-Message-State: AOJu0YyL8aRct8ztbihczR1lFEHosr2iud68L2/c2FtbWXRTmk1SrJIn MBj/uMhM2ycgXMA44slhI/ICTHXLFonx7NEQlqErhyDtMIoLh6Zfolmp1OyBCD08DBEZ8ImThxg GVYhRU60kgM5lHt5FdlGHb9Z4/BhgYKhy X-Gm-Gg: ASbGnctQjBRDcmUFrfF38g7IyYDldeORCttrmJM1uQJFo93FhKS4MIabstyTvk+H0ie WJ3tE3G9EaTu8FnNV+D2wWT6GuWHI0Q+MM8gX3eYX4A1CpGKk7cmhK+dMYBDWFt26eM70umLBXo R3pp6MMZ5pvKHMcVspGFcaHX9rQTo= X-Google-Smtp-Source: AGHT+IEfo8ffwPmRAfgH26LS32oSCP169ucBUt06yeQg/xc2T10/o+zHCCdXkgvBuhTTld6LrcwwFpl7alNW39BOLLA= X-Received: by 2002:a05:6e02:188d:b0:3d3:f15e:8e23 with SMTP id e9e14a558f8ab-3d483fb2587mr143367965ab.10.1742223127203; Mon, 17 Mar 2025 07:52:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tim Gerber Date: Mon, 17 Mar 2025 09:51:55 -0500 X-Gm-Features: AQ5f1Jrp773cwVciffZJwuG2_Pmx0Zi-BnFUFc_vtkpMiJny-5QVJFmGx4H9WGg Message-ID: Subject: Re: Creating a new database on a different file system To: Ian Dauncey Cc: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000009ddd3a06308aee7f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009ddd3a06308aee7f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ian, Tablespaces would work... take a look: https://www.postgresql.org/docs/current/manage-ag-tablespaces.html Best, Tim On Mon, Mar 17, 2025 at 9:49=E2=80=AFAM Ian Dauncey wrote: > Hi All > > > > We are running an old version of PostgreSQL on a Linux Server. > > 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 t= he > same cluster but on a different file system. > > Is this possible and if so, how do we go about it. > > > > In a nutshell: > > > > I have the following statement defined in the postgresql.conf file - > data_directory =3D '/opt/pgdata_postgres' > > > > I have created the following database datadb1, datadb2 (plus all default > databases) > > > > Now I want to create a third database datadb3, but it needs to be created > on file system =E2=80=9C/opt/pgdata1_postgres=E2=80=9D and not on =E2=80= =98/opt/pgdata_postgres' > > > > Is this possible > > > > Regards > > Ian > > > > > --0000000000009ddd3a06308aee7f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ian,

Tablespaces would work... take a look:=C2= =A0=C2=A0https://www.postgresql.org/docs/current/manage-ag-tablespaces.= html

Best,
Tim

On Mon, Mar 17, 2025 at 9:49=E2=80=AFAM Ian Dauncey <Ian.Dauncey@bankzero.co.za> wrote:
<= /div>

Hi All

=C2=A0

We are running an old version o= f PostgreSQL on a Linux Server.

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 sy= stem.

Is this possible and if so, how= do we go about it.

=C2=A0

In a nutshell:

=C2=A0

I have the following statement = defined in the postgresql.conf file - data_directory =3D '/opt/pgdata_p= ostgres'

=C2=A0

I have created the following da= tabase datadb1, datadb2 (plus all default databases)

=C2=A0

Now I want to create a third da= tabase datadb3, but it needs to be created on file system =E2=80=9C/opt/pgd= ata1_postgres=E2=80=9D =C2=A0and not on =E2=80=98/opt/pgdata_postgres'<= u>

=C2=A0

Is this possible<= /span>

=C2=A0

Regards

Ian

=C2=A0

=C2=A0

--0000000000009ddd3a06308aee7f--