From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Different Data Directories For Different Databases In One Instance
Date: Thu, 18 Apr 2024 09:28:57 -0400
Message-ID: <6cad2ce7-5b85-7ccf-d195-859fbc44b14b@sqlexec.com> (raw)
In-Reply-To: <CANzqJaBhHEybkwaToeWDSxZ1sax8h_xMwL-a7ihMFg_zy_FSqQ@mail.gmail.com>
References: <MAXPR01MB3328F773227E6C76B06CF21BFC22A@MAXPR01MB3328.INDPRD01.PROD.OUTLOOK.COM>
<AS4PR10MB55453EC83E81241722755F8E8D0E2@AS4PR10MB5545.EURPRD10.PROD.OUTLOOK.COM>
<CANzqJaBhHEybkwaToeWDSxZ1sax8h_xMwL-a7ihMFg_zy_FSqQ@mail.gmail.com>
You cannot simply re-assign tablespaces to different PostreSQL
instances. You still must export and import them. You can physically
copy a tablespace location to another location (file copy) within a PG
instance, and then change the directory assignment (symlinks) for those
tablespaces. This is often used when folks need a bigger space for
their data or a faster or slower device.
Ron Johnson wrote on 4/18/2024 9:09 AM:
> On Thu, Apr 18, 2024 at 9:04 AM Phani Prathyush Somayajula
> <phani.somayajula@pragmaticplay.com
> <mailto:phani.somayajula@pragmaticplay.com>> wrote:
>
> Hi @pgsql-admin@lists.postgresql.org
> <mailto:pgsql-admin@lists.postgresql.org> ,
>
> I have 2 mounts /data/feed & /data/bets
>
> I have postgres-dev server on which I have 6 feed databases (let’s
> say a,b,c,d,e,f) and 4 bets databases(lets say g,h,i,j)
>
> I want to group the data directories based on the databases, and
> they all should be running from the same instance. Can I achieve
> this ?
>
>
> Tablespaces.
>
> Or if not, can you suggest me a work-around to achieve this
>
>
> Symlinks. But tablespaces are the canonical solution.
>
Regards,
Michael Vitale
Michaeldba@sqlexec.com <mailto:michaelvitale@sqlexec.com>
703-600-9343
Attachments:
[image/jpeg] pgadvanced3.jpg (20.6K, ../6cad2ce7-5b85-7ccf-d195-859fbc44b14b@sqlexec.com/3-pgadvanced3.jpg)
download | view image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: MichaelDBA@sqlexec.com, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Different Data Directories For Different Databases In One Instance
In-Reply-To: <6cad2ce7-5b85-7ccf-d195-859fbc44b14b@sqlexec.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox