0

Per doc of postgres,

Databases are physically separated and access control is managed at the connection level.

Is there any further details that how Postgres achieves this physical isolation? Are those files used to store data in the backend totally separate?

1 Answer 1

1

Is there any further details that how postgres archives this physical isolation? Are those files used to store data in the backend totally separate?

Yes. Each table is stored as a separate file (actually, multiple files). Different databases are in different directories. Indexes, etc are also in one or more separate files.

However, there's a lot of shared state. Some system tables are shared between all databases. The write-ahead log (WAL) is also shared, as is the commit log (pg_clog). So you cannot just extract one database's files and attach it to another PostgreSQL instance. They're meaningless without some of the shared files.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.