ready for release 0.3
authorCédric Villemain <cedric.villemain.debian@gmail.com>
Wed, 12 Aug 2009 00:06:37 +0000 (02:06 +0200)
committerCédric Villemain <cedric.villemain.debian@gmail.com>
Wed, 12 Aug 2009 00:06:37 +0000 (02:06 +0200)
ChangeLog
README.pgfincore
TODO

index bc8a3935f5a1d4d4486e0a6cbbb6eea2f896c4f1..c7b15dd63e37eb937e4350b5c712f19f87d61c79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,22 @@
-06/27/2009 Cédric Villemain <cedric.villemain@dalibo.com>
+12/08/2009 Cédric Villemain <cedric.villemain@dalibo.com>
 
-  * 0.1 - functions are working, basicaly.
+  * 0.3 - pgfincore now return a set of record
+               - relname, relpath, block_disk, block_mem, group_mem
+               - this version can only be build againt a postgresql > 8.3 /!\
 
-06/29/2009 Cédric Villemain <cedric.villemain@dalibo.com>
+10/08/2009 Cédric Villemain <cedric.villemain@dalibo.com>
 
-  * 0.1.1 - cleaning and fixing
+  * 0.2.1 - fix munmap call error
 
 08/08/2009 Cédric Villemain <cedric.villemain@dalibo.com>
 
- * 0.2 - add support for 8.4
-       - fix mmap error when file is empty
 * 0.2 - add support for 8.4
+               - fix mmap error when file is empty
 
-10/08/2009 Cédric Villemain <cedric.villemain@dalibo.com>
+06/29/2009 Cédric Villemain <cedric.villemain@dalibo.com>
+
+  * 0.1.1 - cleaning and fixing
 
- * 0.2.1 - fix munmap call error
+06/27/2009 Cédric Villemain <cedric.villemain@dalibo.com>
+
+  * 0.1 - functions are working, basicaly.
index 15b8283794a3283a35d1ce530f51c9791457d7dc..d6830461b0abf04ba743f814b5ace9019032f52e 100644 (file)
@@ -1,5 +1,5 @@
 Version :
-v0.2
+v0.3
 
 Install:
 ./configure && make clean && make && sudo make install
@@ -7,25 +7,21 @@ Install:
 Create the functions from the sql script (it should be in your contrib directory)
 
 Debug:
-set client_min_messages TO debug;
+set client_min_messages TO debug5;
 
 Use it:
-create view pgfincore as 
-select  relation,
-       pg_size_pretty(size) as size,
-       size/4/1024 as block_disk,
-       block_mem,
-       CASE WHEN size=0 then NULL ELSE (block_mem*4*1024*100/size)||' %'  END as ratio
-from (select relname as relation,
-             pgfincore(relname::text) as block_mem,
-             pg_relation_size(relname::text) as size
-      from pg_stat_user_tables
-      union all
-      select relname||'.'||indexrelname as relation,
-             pgfincore(indexrelname::text) as block_mem,
-             pg_relation_size(indexrelname::text) as size
-      from pg_stat_user_indexes ) s
-order by 1 ;
+
+cedric=# select * from pgfincore('test');
+ relname |      relpath       | block_disk | block_mem | group_mem
+---------+--------------------+------------+-----------+-----------
+ test    | base/16987/26245   |     262144 |         0 |         0
+ test    | base/16987/26245.1 |       8090 |         0 |         0
+cedric=# select * from test limit 10000;
+cedric=# select * from pgfincore('test');
+ relname |      relpath       | block_disk | block_mem | group_mem
+---------+--------------------+------------+-----------+-----------
+ test    | base/16987/26245   |     262144 |       426 |         1
+ test    | base/16987/26245.1 |       8090 |         0 |         0
 
 Enjoy ;)
 
diff --git a/TODO b/TODO
index 2f768ff7bd0e7e58a03ef1e1ccf62e33a25e8de2..9b50019bc41e4b8407ccc6285f872079c24b18e8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,3 @@
 * average contigous block or stats like that (what part of the file is in cache)
 * split mmaping in shorter segment (say 64Mb) per sugestion from Andres Freund
-
+* pgfincore_total to get info from relation and its toasted table(s).