Re: pg_prewarm

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_prewarm
Date: 2012-03-09 04:51:04
Message-ID: CAJKUy5g9rj2wJuusR_T-WFk03i1C4fTBOsH3q0RQvhFytehR9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 8, 2012 at 11:13 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> It's been bugging me for a while now that we don't have a prewarming
> utility, for a couple of reasons, including:
>
> 1. Our customers look at me funny when I suggest that they use
> pg_relation_filepath() and /bin/dd for this purpose.
>

well, you can't deny that is funny see people doing faces ;)

>
> So I wrote a prewarming utility.  Patch is attached.

cool!

just a suggestion, can we relax this check? just send a WARNING or a
NOTICE and set "last_block = nblocks - 1"
just an opinion

+ if (PG_ARGISNULL(4))
+ last_block = nblocks - 1;
+ else
+ {
+ last_block = PG_GETARG_INT64(4);
+ if (last_block > nblocks)
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("ending block number " INT64_FORMAT " exceeds number of
blocks in relation " INT64_FORMAT, last_block, nblocks)));
+ }

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

  • pg_prewarm at 2012-03-09 04:13:02 from Robert Haas

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-09 05:00:01 Re: pgsql_fdw, FDW for PostgreSQL server
Previous Message Robert Haas 2012-03-09 04:13:02 pg_prewarm