pgfincore 0.4 released - Mailing list pgsql-announce

From Cédric Villemain
Subject pgfincore 0.4 released
Date
Msg-id e94e14cd1001050821r7236f427x4b2c850f1f1f964f@mail.gmail.com
Whole thread Raw
List pgsql-announce
Happy new year dear PostgreSQL users !

PgFincore 0.4 is out : http://villemain.org/projects/pgfincore

New :
--------

Those tools let you record which disk block from a table are in the buffer cache
of the operating system, and write the result to a file.
Then using this file, it is possible to restore the buffer cache state for each
block of the relation.

What is it ?
----------------

PgFincore is a set of functions to manage blocks in memory.
Each Table or Index is truncated in segment of (usually) 1GB, and each segment
is truncated in block in filesystem.

It is usefull on server (not postgresql, but hardware ) restart : it fill the
buffer cache with the blocks that were in buffer cache *before* shutdown. So
first executed queries in postgresql are not slow down because of extra I/O.

Each functions are call with a table or index name (or oid) as a parameter and
walk each segment of the relation.

Pgmincore will return information on the number of blocks per segment wich are
actually in the buffer cache of the operating system. It also provide the
amount of contigous blocks in memory. (a big number is probably the
representation of a heavy random scan segment, and a low number a seqscan or a
small segment)
The function pgmincore_snapshot push this information to a file.

Pgfadv_willneed_snapshot is then used to reload blocks in the buffer cache of
the operating system.

All other functions are used to set a posix_fadvise flag on the entire relation
(each segment). The more usefull are probably WILLNEED and DONTNEED wich push
and pop from buffer cache respectively.

man 2 posix_fadvise for more information.

--
Cédric Villemain

pgsql-announce by date:

Previous
From: benoît carpentier
Date:
Subject: Benetl, a free ETL tool for files using postgreSQL, is out in version 3.3
Next
From: "Joshua D. Drake"
Date:
Subject: PostgreSQL Conference East, Change of Venue and Dates