Re: pg_prewarm - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: pg_prewarm
Date
Msg-id CAMkU=1xOSTpT8=VLcghcYQE6xR0Paqm-iwNcp=dZ81rdLgVKQQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_prewarm  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_prewarm  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Mar 9, 2012 at 5:21 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Mar 9, 2012 at 5:24 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> When a relation is loaded into cache, are corresponding indexes also loaded
>> at the same time?
>
> No, although if you wanted to do that you could easily do so, using a
> query like this:
>
> select pg_prewarm(indexrelid, 'main', 'read', NULL, NULL) from
> pg_index where indrelid = 'your_table_name'::regclass;

Could that be included in an example?  Maybe admins are expected to
know how to construct such queries of the cuff, but I always need to
look it up each time which is rather tedious.

In the patch:

s/no special projection/no special protection/

Thanks for putting this together.

Cheers,

Jeff


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_prewarm
Next
From: Merlin Moncure
Date:
Subject: Re: elegant and effective way for running jobs inside a database