Re: Multiple databases and shared_buffers - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Multiple databases and shared_buffers
Date
Msg-id CANu8FixE6ZsLS-xLw8GBrwPN6uVc7jLj8Q-qVStcWH8KHp3XEQ@mail.gmail.com
Whole thread Raw
In response to Re: Multiple databases and shared_buffers  (John R Pierce <pierce@hogranch.com>)
Responses Re: Multiple databases and shared_buffers  (Rakesh Kumar <dcruncher4@aim.com>)
List pgsql-general
>What do you mean that the data is actually not stored in the shared buffer.  
>From the link you provided :
>"The “shared_buffers” configuration parameter determines how much memory
>is dedicated to PostgreSQL to use for caching data.
"


Again, you misunderstand. Cached data (and queries) is for sharing only to the same database.
So if user A in Database abc does a "SELECT some_column FROM table1 WHERE col2 = 4" Then the results/data from that query are available to any other user (who has permission) in database abc and does the same
exact query. However, users from database xyz CANNOT see data and/or results from database abc unless they specifically connect to it. Further to the point, Beginning with 9.4, PostgreSQL also makes better use of O/S memory for shared_buffers. But the bottom line is, you do not need to split shared_buffers up among different databases. PostgreSQL just uses it to make queries more efficient. There is no security problem because users in one database cannot request buffer information about another.

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Multiple databases and shared_buffers
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL vs Firebird SQL