public inbox for [email protected]
help / color / mirror / Atom feedMany databases ou many schemas
5+ messages / 4 participants
[nested] [flat]
* Many databases ou many schemas
@ 2022-05-20 14:03 Daniel Bergmann <[email protected]>
2022-05-20 14:13 ` Re: Many databases ou many schemas Laurenz Albe <[email protected]>
2022-05-20 14:15 ` Re: Many databases ou many schemas MichaelDBA Vitale <[email protected]>
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Bergmann @ 2022-05-20 14:03 UTC (permalink / raw)
To: [email protected]
Folks ! who can help, I'm migrating a sql server system that contains many
databases and that the queries in these make join between the databases,
going to postgres I create a database with only several schemas? or several
databases using dblink to do the joins? in case of a single database how
can I manage the tablespaces? per schema (1 schema in 1 tablespace) ?
Thanks,
Daniel
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Many databases ou many schemas
2022-05-20 14:03 Many databases ou many schemas Daniel Bergmann <[email protected]>
@ 2022-05-20 14:13 ` Laurenz Albe <[email protected]>
2022-05-20 14:16 ` Re: Many databases ou many schemas MichaelDBA Vitale <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: Laurenz Albe @ 2022-05-20 14:13 UTC (permalink / raw)
To: Daniel Bergmann <[email protected]>; [email protected]
On Fri, 2022-05-20 at 11:03 -0300, Daniel Bergmann wrote:
> Folks ! who can help, I'm migrating a sql server system that contains many databases
> and that the queries in these make join between the databases, going to postgres I
> create a database with only several schemas? or several databases using dblink to
> do the joins? in case of a single database how can I manage the tablespaces?
> per schema (1 schema in 1 tablespace) ?
If you want to join the tables, use different schemas in a single database.
dblink or foreign data wrappers would just add additional complexity and
slow down operation.
Don't create any tablespaces, keep everything in the default tablespace.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Many databases ou many schemas
2022-05-20 14:03 Many databases ou many schemas Daniel Bergmann <[email protected]>
2022-05-20 14:13 ` Re: Many databases ou many schemas Laurenz Albe <[email protected]>
@ 2022-05-20 14:16 ` MichaelDBA Vitale <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: MichaelDBA Vitale @ 2022-05-20 14:16 UTC (permalink / raw)
To: Laurenz Albe <[email protected]>; Daniel Bergmann <[email protected]>; [email protected]
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
ditto to Laurenz! We both must have written at the same time!
</div>
<div class="default-style">
<br>
</div>
<blockquote type="cite">
<div>
On 05/20/2022 10:13 AM Laurenz Albe <<a href="mailto:[email protected]">[email protected]</a>> wrote:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
On Fri, 2022-05-20 at 11:03 -0300, Daniel Bergmann wrote:
</div>
<blockquote type="cite">
<div>
Folks ! who can help, I'm migrating a sql server system that contains many databases
</div>
<div>
and that the queries in these make join between the databases, going to postgres I
</div>
<div>
create a database with only several schemas? or several databases using dblink to
</div>
<div>
do the joins? in case of a single database how can I manage the tablespaces?
</div>
<div>
per schema (1 schema in 1 tablespace) ?
</div>
</blockquote>
<div>
If you want to join the tables, use different schemas in a single database.
</div>
<div>
dblink or foreign data wrappers would just add additional complexity and
</div>
<div>
slow down operation.
</div>
<div>
<br>
</div>
<div>
Don't create any tablespaces, keep everything in the default tablespace.
</div>
<div>
<br>
</div>
<div>
Yours,
</div>
<div>
Laurenz Albe
</div>
<div>
--
</div>
<div>
Cybertec | <a href="https://www.cybertec-postgresql.com"; rel="noopener" target="_blank">https://www.cybertec-postgresql.com</a;
</div>
</blockquote>
</body>
</html>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Many databases ou many schemas
2022-05-20 14:03 Many databases ou many schemas Daniel Bergmann <[email protected]>
@ 2022-05-20 14:15 ` MichaelDBA Vitale <[email protected]>
2022-05-20 19:57 ` Re: Many databases ou many schemas Ron <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: MichaelDBA Vitale @ 2022-05-20 14:15 UTC (permalink / raw)
To: Daniel Bergmann <[email protected]>; [email protected]
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Hi Daniel,
</div>
<div class="default-style">
<br>
</div>
<div class="default-style">
My preference would be to create multiple schemas in one database and avoid the headache of using dblink/postgres_fdw to communicate back and forth. Regarding tablespaces, no need to do anything special there, just use the default tablespace that all objects go into. In PG, tablespaces only have importance when mapping them to different mount points that might have different IO response times.
</div>
<div class="default-style">
<br>
</div>
<div class="default-style">
Regards,
</div>
<div class="default-style">
Michael Vitale
</div>
<blockquote type="cite">
<div>
On 05/20/2022 10:03 AM Daniel Bergmann <[email protected]> wrote:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div dir="ltr">
Folks ! who can help, I'm migrating a sql server system that contains many databases and that the queries in these make join between the databases, going to postgres I create a database with only several schemas? or several databases using dblink to do the joins? in case of a single database how can I manage the tablespaces? per schema (1 schema in 1 tablespace) ?
<br>
<div>
<br>
</div>
<div>
Thanks,
</div>
<div>
Daniel
</div>
</div>
</blockquote>
</body>
</html>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Many databases ou many schemas
2022-05-20 14:03 Many databases ou many schemas Daniel Bergmann <[email protected]>
2022-05-20 14:15 ` Re: Many databases ou many schemas MichaelDBA Vitale <[email protected]>
@ 2022-05-20 19:57 ` Ron <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Ron @ 2022-05-20 19:57 UTC (permalink / raw)
To: [email protected]
On 5/20/22 09:15, MichaelDBA Vitale wrote:
> In PG, tablespaces only have importance when mapping them to different
> mount points that might have different IO response times.
Or if for some reason "you" don't want to use lvm.
Likewise, auditors or upper management might say that each "database" must
be in a separate folder.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-05-20 19:57 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 14:03 Many databases ou many schemas Daniel Bergmann <[email protected]>
2022-05-20 14:13 ` Laurenz Albe <[email protected]>
2022-05-20 14:16 ` MichaelDBA Vitale <[email protected]>
2022-05-20 14:15 ` MichaelDBA Vitale <[email protected]>
2022-05-20 19:57 ` Ron <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox