Re: Proposal : For Auto-Prewarm.

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Beena Emerson <memissemerson(at)gmail(dot)com>
Cc: Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal : For Auto-Prewarm.
Date: 2017-01-25 19:46:22
Message-ID: 406c5033-3f76-1ed8-4db5-687059cd9031@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/24/17 11:13 PM, Beena Emerson wrote:
>
> On Wed, Jan 25, 2017 at 10:36 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com
> <mailto:Jim(dot)Nasby(at)bluetreble(dot)com>> wrote:
>
> On 1/24/17 2:26 AM, Mithun Cy wrote:
>
> Thanks for looking into this patch, I just downloaded the patch and
> applied same to the latest code, I can see file "
> autoprewarm.save" in
> $PGDATA which is created and dumped at shutdown time and an activity
> is logged as below
> 2017-01-24 13:22:25.012 IST [91755] LOG: Buffer Dump: saved
> metadata
> of 59 blocks.
>
>
> Yeah, I wasn't getting that at all, though I did see the shared
> library being loaded. If I get a chance I'll try it again.
>
>
>
> Hope u added the following to the conf file:
>
> shared_preload_libraries = 'pg_autoprewarm' # (change requires restart)

Therein lied my problem: I was preloading pg_prewarm, not pg_autoprewarm.

I think the two need to be integrated much better than they are right
now. They should certainly be in the same .so, and as others have
mentioned the docs need to be fixed. For consistency, I think the name
should just be pg_prewarm, as well as the prefix for the GUC.

Based on that and other feedback I'm going to mark this as returned with
feedback, though if you're able to get a revised patch in the next few
days please do.

FYI (and this is just a suggestion), for testing purposes, it might also
be handy to allow manual dump and load via functions, with the load
function giving you the option to forcibly load (instead of doing
nothing if there are no buffers on the free list). It would also be
handy of those functions accepted a different filename. That way you
could reset shared_buffers to a known condition before running a test.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2017-01-25 19:48:03 Re: Proposal : For Auto-Prewarm.
Previous Message Tom Lane 2017-01-25 19:41:27 Re: Checksums by default?