Re: pg_prewarm

From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Stefan Keller <sfkeller(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pg_prewarm
Date: 2012-03-18 11:25:15
Message-ID: 201203181225.15553.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Would be nice to sort out the features of the two Postgres extentions
> pgfincore (https://github.com/klando/pgfincore ) and pg_prewarm: what
> do they have in common, what is complementary?

pg_prewarm use postgresql functions (buffer manager) to warm data (different
kind of 'warm', see pg_prewarm code). Relations are warmed block by block, for
a range of block.

pgfincore does not use the postgresql buffer manager, it uses the posix calls.
It can proceed per block or full relation.

Both need POSIX_FADVISE compatible system to be efficient.

The main difference between pgfincore and pg_prewarm about full relation warm is
that pgfincore will make very few system calls when pg_prewarm will do much
more.

The current implementation of pgfincore allows to make a snapshot and restore
via pgfincore or via pg_prewarm (just need some SQL-fu for the later).

>
> I would be happy to test both. But when reading the current
> documentation I'm missing installation requirements (PG version,
> replication? memory/hardware requirements), specifics of Linux (and
> Windows if supported), and some config. hints (e.g.
> relationships/dependencies of OS cache and PG cache an
> postgresql.conf).

pgfincore works with all postgresql stable releases. Probably idem for
pg_prewarm.

in both case, make && make install, then some SQL file to load for <=9.0.

With 9.1, once you've build and install, just CREATE EXTENSION pg_fincore;
(probably the same with pg_prewarm)

>
> -Stefan
>
> 2012/3/11 Cédric Villemain <cedric(at)2ndquadrant(dot)com>:
> > Le vendredi 9 mars 2012 16:50:05, Robert Haas a écrit :
> >> On Fri, Mar 9, 2012 at 10:33 AM, Dimitri Fontaine
> >>
> >> <dimitri(at)2ndquadrant(dot)fr> wrote:
> >> > So that's complementary with pgfincore, ok. I still wish we could
> >> > maintain the RAM content HOT on the standby in the same way we are
> >> > able to maintain its data set on disk, though.
> >>
> >> That's an interesting idea. It seems tricky, though.
> >
> > it is the purpose of the latest pgfincore version.
> > I use a varbit as output of introspection on master, then you are able to
> > store in a table, stream to slaves, then replay localy.
> >
> > --
> > Cédric Villemain +33 (0)6 20 30 22 52
> > http://2ndQuadrant.fr/
> > PostgreSQL: Support 24x7 - Développement, Expertise et Formation
> >
> > --
> > Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-hackers

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-18 15:08:13 Re: sortsupport for text
Previous Message Magnus Hagander 2012-03-18 10:42:03 Re: Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role)