Re: PostgreSQL Process memory architecture - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: PostgreSQL Process memory architecture
Date
Msg-id CAOeZVie4mZL6_V3vG5Zr2mLZrboOEonk=_BWOd=EQw_2mSJFrw@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL Process memory architecture  ("Ben Zeev, Lior" <lior.ben-zeev@hp.com>)
Responses Re: PostgreSQL Process memory architecture  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Mon, May 27, 2013 at 3:55 PM, Ben Zeev, Lior <lior.ben-zeev@hp.com> wrote:
> Thanks Atri!
>
> Do you know why PostgreSQL store the indexes in memory per process and not in the shared memory?
> Is there a way to prevent it store the indexes data per process, and force it storing it in the shared memory?


Ok, sorry for a bit of a confusion here.

I am assuming that the multiple processes are accessing the same database.

What happens essentially is that each index is stored as a separate
file in the data directory of the database in the directory of the
cluster in which your database belongs.

So,indexes are essentially stored the same way as tables, in form of
files which are accessed in 8K blocks.

If your index is big/you have too many indexes in your database, it
should affect *all* backends accessing that specific database.

So,my point is that,there is no question of indexes being stored in
shared memory or individually. You can treat indexes the same as your
tables,from the point of view of physical storage.

For more details,you can see

http://www.postgresql.org/docs/8.1/static/storage.html

Regards,

Atri
--
Regards,

Atri
l'apprenant



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: repeated warnings with 9.3 Beta 1 on windows
Next
From: Amit Langote
Date:
Subject: Re: PostgreSQL Process memory architecture