Re: PostgreSQL Process memory architecture

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: "Ben Zeev, Lior" <lior(dot)ben-zeev(at)hp(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL Process memory architecture
Date: 2013-05-27 11:36:12
Message-ID: CAOeZVie4mZL6_V3vG5Zr2mLZrboOEonk=_BWOd=EQw_2mSJFrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 27, 2013 at 3:55 PM, Ben Zeev, Lior <lior(dot)ben-zeev(at)hp(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2013-05-27 11:50:52 Re: PostgreSQL Process memory architecture
Previous Message Amit Kapila 2013-05-27 11:24:00 Re: repeated warnings with 9.3 Beta 1 on windows