From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Blood <david@matraex.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Pinning a table into memory
Date: Fri, 04 Oct 2002 14:47:47 -0400
Message-ID: <25545.1033757267@sss.pgh.pa.us> (raw)
In-Reply-To: <03a301c26bc5$a799a970$1f00a8c0@redwood>
References: <03a301c26bc5$a799a970$1f00a8c0@redwood>
"David Blood" <david@matraex.com> writes:
> In Oracle you can Pin large objects into memory to prevent frequent
> reloads. Is there anyway to do this with Postgres?
I can never understand why people think this would be a good idea.
If you're hitting a table frequently, it will stay in memory anyway
(either in Postgres shared buffers or kernel disk cache). If you're
not hitting it frequently enough to keep it swapped in, then whatever
is getting swapped in instead is probably a better candidate to be
occupying the space. ISTM that a manual "pin this table" knob would
mostly have the effect of making performance worse, whenever the
system activity is slightly different from the situation you had in
mind when you installed the pin.
Having said that, I'll freely concede that our cache management
algorithms could use improvement (and there are people looking at
that right now). But a manual pin doesn't seem like a better answer.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, david@matraex.com, pgsql-general@postgresql.org
Subject: Re: Pinning a table into memory
In-Reply-To: <25545.1033757267@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox