From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Jim Nasby <jim(at)nasby(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Jeff Amiel <becauseimjeff(at)yahoo(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_rewarm status |
Date: | 2013-12-18 15:03:19 |
Message-ID: | CA+TgmoazJdHgF7w6F80TBeabYA_3TCehe55DvZtUrovep+wPVg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 17, 2013 at 12:35 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> Since it doesn't use directIO, you can't warm the PG buffers without also
> warming FS cache as a side effect. That is why I like 'buffer' as the
> default--if the data fits in shared_buffers, it warm those, otherwise it at
> least warms the FS. If you want to only warm the FS cache, you can use
> either the 'prefetch' or 'read' modes instead.
All right, here is an updated patch. I swapped the second and third
arguments, because I think overriding the prewarm mode will be a lot
more common than overriding the relation fork. I also added defaults,
so you can do this:
SELECT pg_prewarm('pgbench_accounts');
Or this:
SELECT pg_prewarm('pgbench_accounts', 'read');
I also fixed some oversights in the error checks.
I'm not inclined to wait for the next CommitFest to commit this,
because it's a very simple patch and has already had a lot more field
testing than most patches get before they're committed. And it's just
a contrib module, so the damage it can do if there is in fact a bug is
pretty limited. All that having been said, any review is appreciated.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
pg_prewarm_v2.patch | text/x-patch | 11.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-12-18 15:05:01 | Re: SQL objects UNITs (was: Extension Templates S03E11) |
Previous Message | Tatsuo Ishii | 2013-12-18 14:55:41 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters |