pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Different Data Directories For Different Databases In One Instance
4+ messages / 4 participants
[nested] [flat]

* Different Data Directories For Different Databases In One Instance
@ 2024-04-18 13:04  Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Phani Prathyush Somayajula @ 2024-04-18 13:04 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

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 ?

Or if not, can you suggest me a work-around to achieve this

Regards,
Phani

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Different Data Directories For Different Databases In One Instance
@ 2024-04-18 13:08  Keith <keith@keithf4.com>
  parent: Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Keith @ 2024-04-18 13:08 UTC (permalink / raw)
  To: Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

On Thu, Apr 18, 2024 at 9:04 AM Phani Prathyush Somayajula <
phani.somayajula@pragmaticplay.com> wrote:

> Hi @pgsql-admin@lists.postgresql.org <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 ?
>
>
>
> Or if not, can you suggest me a work-around to achieve this
>
>
>
> Regards,
>
> Phani
>
>
>

Look into tablespaces

https://www.postgresql.org/docs/current/manage-ag-tablespaces.html

Keith

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Different Data Directories For Different Databases In One Instance
@ 2024-04-18 13:09  Ron Johnson <ronljohnsonjr@gmail.com>
  parent: Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Ron Johnson @ 2024-04-18 13:09 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

On Thu, Apr 18, 2024 at 9:04 AM Phani Prathyush Somayajula <
phani.somayajula@pragmaticplay.com> wrote:

> Hi @pgsql-admin@lists.postgresql.org <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.

>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Different Data Directories For Different Databases In One Instance
@ 2024-04-18 13:28  MichaelDBA <MichaelDBA@sqlexec.com>
  parent: Ron Johnson <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: MichaelDBA @ 2024-04-18 13:28 UTC (permalink / raw)
  To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2024-04-18 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 13:04 Different Data Directories For Different Databases In One Instance Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>
2024-04-18 13:08 ` Keith <keith@keithf4.com>
2024-04-18 13:09 ` Ron Johnson <ronljohnsonjr@gmail.com>
2024-04-18 13:28   ` MichaelDBA <MichaelDBA@sqlexec.com>

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