On Thu, Mar 8, 2012 at 11:13 PM, Robert Haas <robertmh...@gmail.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers