A PostgreSQL "schema" is roughly the same as a MySQL "database". Having many databases on a PostgreSQL installation can get problematic; having many schemas will work with no trouble. So you definitely want to go with one database and multiple schemas within that database.

Answer from kquinn on Stack Overflow
🌐
Reddit
reddit.com › r/postgresql › database or schema? [newbie]
r/PostgreSQL on Reddit: Database or schema? [newbie]
February 10, 2014 -

I work as a web developer and have experience with both Oracle and SQL Server but I've started to look into PostgreSQL, to begin with for personal projects but I'll hopefully be able to move the company at least partially over from Oracle to PostgreSQL in the future.

I've set up a dedicated machine running PostgreSQL and so far I'm really liking what I'm seeing and reading. My only stumble block so far is more of a question of best practice and is basically when to use databases and when to use schemas. As far as I can tell they can both be used to solve many of the same task, i.e. setting a tablespace and namespacing objects. The only difference I've seen so far is that roles are separate between databases. So how do you choose when to create a new database and when to just use a new schema?

For my personal projects I'm leaning towards just using schemas since I'd prefer to have roles be able to access multiple schemas. Is there any good reasons to instead use databases?

Oh, and does the default database "postgres" have any special meaning(like the template databases), or should I just create my schemas in it and not bother creating a new database?

[Q] What is the purpose of a schema Mar 11, 2022
r/Database
4y ago
Db alternative schema Oct 11, 2020
r/PostgreSQL
5y ago
Guide to naming database schemas? Oct 5, 2024
r/PostgreSQL
last yr.
More results from reddit.com
🌐
PostgreSQL
postgresql.org › docs › current › ddl-schemas.html
PostgreSQL: Documentation: 18: 5.10. Schemas
May 14, 2026 - A user can also be allowed to create objects in someone else's schema. To allow that, the CREATE privilege on the schema needs to be granted. In databases upgraded from PostgreSQL 14 or earlier, everyone has that privilege on the schema public.
Discussions

Is it better to use multiple databases with one schema each, or one database with multiple schemas? - Stack Overflow
Now, I'll need to do the same with PostgreSQL (the project is getting mature and MySQL don't fulfil all the needs). I need to have all the databases/schemas backups independent: pg_dump works perfectly in both ways, and the same for the users that can be configured to access just one schema ... More on stackoverflow.com
🌐 stackoverflow.com
Example where schema are better than multiple databases - Database Administrators Stack Exchange
In several database systems (e.g., PostgreSQL and MS SQL Server) there is a concept of schema. There are many questions out there asking what schema are and how they are used; here is a good one. U... More on dba.stackexchange.com
🌐 dba.stackexchange.com
September 19, 2019
Can someone help me understand schemas and how they relate to databases?
I understand the general concept of namespaces but first of all is schema just a word for namespace? Yes. Specifically, schemas are the implementation in postgres of the namespace concept. Any of the objects defined in a database (tables, views, indexes, sequences, etc.) are defined within a schema within the database. By default objects are created in the public schema, but you can have as many named schemas as you want and organize the database objects into those schemas. Can existing databases be configured with namespaces, can they use multiple namespaces? Yes, you can add schemas to a database. For the new schema to be useful you will need to create some objects (e.g. tables) in it, or move some objects into it. For example you can use alter table ... set schema .... to move an existing table to a different schema. Is this valuable for security if you can configure users to have access to the databases in a certain namespace without giving them access to databases? Yes, although schemas exist within a database, not the other way around. Mostly security permissions are assigned to individual objects. It is possible though to assign a privilege for all objects (e.g. tables) in a particular schema to a particular role, so in that way you're right that it can be helpful to managing security permissions. More on reddit.com
🌐 r/PostgreSQL
10
16
November 3, 2021
Is it possible to compare two databases?
The proper solution is NEVER to compare. You start by making every change in file, called migration or patch. And then there is process that can tell you which migrations were applied, and which not, and/or up apply all "missing" changes. Generally manual changes in db should not happen outside of "let's test how it works, if it doesn't well - drop it. if it does - drop it, and make proper migration". More on reddit.com
🌐 r/PostgreSQL
21
10
July 30, 2024
🌐
Sprinkle Data
sprinkledata.ai › blogs › postgresql-schema-vs-database-unveiling-the-distinctions-for-effective-data-management
PostgreSQL Schema vs. Database: Differences, Benefits & Best Practices
Scalability Considerations: Schemas can be employed for horizontal scalability by distributing data across multiple schemas or servers. A database in PostgreSQL is a higher-level organizational unit that contains all the schemas.
🌐
Crunchy Data Blog
crunchydata.com › blog › postgres-databases-and-schemas
Postgres Databases and Schemas | Crunchy Data Blog
October 27, 2022 - Most of the time when you talk about schema you mean the tables and columns you create inside your database. Postgres also has a notion of schemas, schemas are logically separated by a namespace within the database.
Find elsewhere
🌐
J6n
blog.j6n.ca › notes › databases › postgres › schemas
Schemas - Jon's Blog
A schema in postgres is a collection of database resources.
🌐
Postgresonline
postgresonline.com › journal › archives › 265-Schemas-vs.-Schemaless-structures-and-The-PostgreSQL-Type-Farm.html
Schemas vs. Schemaless structures and The PostgreSQL Type Farm - Postgres OnLine Journal
August 12, 2012 - There has been a lot of talk lately about schemaless models touted by NoSQL groups and how PostgreSQL fits into this New world order. Is PostgreSQL Object-Relational? Is it Multi-Model. We tend to think of PostgreSQL as type liberal and it's liberalness gets more liberal with each new release.
Top answer
1 of 1
24

Postgres documentation indeed provides the answer, although it is spread across its many sections. It begins with this general statement:

It is not possible to access more than one database per connection. [...] Databases are physically separated and access control is managed at the connection level. If one PostgreSQL server instance is to house projects or users that should be separate and for the most part unaware of each other, it is therefore recommended to put them into separate databases. If the projects or users are interrelated and should be able to use each other's resources, they should be put in the same database but possibly into separate schemas.

There are some things that you can control only at the database level, but not at the schema level. Among them:

  • Object privileges. The database owner role privileges override anything granted at the object (schema, table, etc.) level, unless explicitly revoked.
  • Database connection privileges. You can control at the database level what users can connect to it from what IP addresses.
  • Configuration parameters. This allows you to tune each database for its specific workload.
  • Maintenance. While you can backup and restore individual schemas using pg_dump and pg_restore, operations like point-in-time recovery, log shipping, and streaming replication work at the database (actually, cluster) level.

The minor downside of having multiple databases on the same server is the storage and memory overhead of maintaining and caching system catalogs for each database.

If you often query tables in different namespaces you might also prefer multiple schemas over databases. It is possible to query tables across different databases, but this requires setting up foreign data wrappers, which brings about additional maintenance and possible performance implications.

In short, if your applications require strict security isolation (e.g. the administrator in one namespace must not have access to other namespaces), or they have very different workload patterns, and you don't need to query tables in different databases, you should choose to implement multiple databases.

If, on the other hand, the workload pattern is the same for all namespaces, and you don't require strict separation of duties, and you often query tables across namespaces, you should probably use schemas in a single database for logical isolation of data. This is often the preferred scenario for multi-tenant applications.

🌐
Neon
neon.com › postgresql › administration › schema
An Essential Guide to PostgreSQL Schema
In PostgreSQL, a schema is a named collection of database objects, including tables, views, indexes, data types, functions, stored procedures, and operators.
🌐
Navicat
navicat.com › en
Navicat GUI | Comprehensive Database Management Tool
Manage MySQL, Redis, PostgreSQL, MongoDB, MariaDB, SQL Server, Oracle, Snowflake, and SQLite database with Navicat's intuitive GUI. Streamline your database tasks for improved efficiency!
🌐
Drizzle ORM
orm.drizzle.team › docs › get-started › postgresql-new
Drizzle ORM - PostgreSQL
We will use node-postgres for this get started example. But if you want to find more ways to connect to postgresql check our PostgreSQL Connection page · This is the basic file structure of the project. In the src/db directory, we have table definition in schema.ts.
🌐
Prisma
prisma.io › dataguide › postgresql › getting-to-know-postgresql
Understanding PostgreSQL architecture and attributes
For example, you might see the ... to as the schema of the product table. A PostgreSQL schema, however, is a specific database object that can be created and managed within the system....
🌐
Medium
iniakunhuda.medium.com › introduction-to-postgresql-schemas-a-practical-guide-8089b351b953
Introduction to PostgreSQL Schemas: A Practical Guide | by Miftahul Huda | Medium
February 26, 2025 - PostgreSQL schemas work in the same way for your database — they’re like virtual containers that help you organize database objects such as tables, views, functions, and indexes into logical groups.
🌐
GitHub
github.com › pgvector › pgvector
GitHub - pgvector/pgvector: Open-source vector similarity search for Postgres · GitHub
April 28, 2026 - set "PGROOT=C:\Program Files\PostgreSQL\18" cd %TEMP% git clone --branch v0.8.5 https://github.com/pgvector/pgvector.git cd pgvector nmake /F Makefile.win nmake /F Makefile.win install ... You can also install it with Docker or conda-forge. Enable the extension (do this once in each database where you want to use it)
Starred by 22.3K users
Forked by 1.2K users
Languages   C 76.8% | Perl 22.3%
🌐
CockroachDB
cockroachlabs.com
CockroachDB | Distributed SQL for always-on customer experiences
Learn more about running PostgreSQL more efficiently at scale. ... Moving away from traditional data infrastructure requires applications and data that are agile, global and resilient. CockroachDB is a modern database that enables organizations to navigate database modernization with confidenceRead the guide→
🌐
Quora
quora.com › Should-you-create-a-new-schema-or-just-use-the-public-schema-of-PostgreSQL
Should you create a new schema or just use the public schema of PostgreSQL? - Quora
Answer (1 of 4): Depends on what you want to accomplish. It's a way to organize data much like folders on a harddrive. A database server can contain multiple databases. Each database can contain multiple schemas. Each schema can contain multiple relations. A database connection can only be conne...