remove useless total mem
authorCédric Villemain <cedric.villemain.debian@gmail.com>
Wed, 23 Dec 2009 22:25:05 +0000 (23:25 +0100)
committerCédric Villemain <cedric.villemain.debian@gmail.com>
Wed, 23 Dec 2009 22:25:05 +0000 (23:25 +0100)
ChangeLog
pgfincore.c

index 7cc8f3a949f1be29cb5232d620ea6067f94928ed..e959228aa22ef362a2d0e6289a450db5592deca2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
                  - improve output (more informations)
                  - add pgsysconf()
                  - add pgmincore_snapshot to write mincore state in a file
+                 - add pgfadv_willneed_snapshot to read mincore state from file
 
 26/10/2009 Cédric Villemain <cedric.villemain@dalibo.com>
 
index 26ae1e87be7ded5ac659c3bc0e4fa97840ac01c1..0f8c7a9d9483d097763967dbb77f918e0a8ed722 100644 (file)
@@ -349,8 +349,8 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo)
 {
   HeapTuple    tuple;
   TupleDesc tupdesc;
-  Datum                values[5];
-  bool         nulls[5];
+  Datum                values[4];
+  bool         nulls[4];
 
   // for open file
   int fd;
@@ -364,8 +364,7 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo)
   TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpath",     TEXTOID, -1, 0);
   TupleDescInitEntry(tupdesc, (AttrNumber) 2, "block_size",  INT8OID, -1, 0);
   TupleDescInitEntry(tupdesc, (AttrNumber) 3, "block_disk",  INT8OID, -1, 0);
-  TupleDescInitEntry(tupdesc, (AttrNumber) 4, "block_cache", INT8OID, -1, 0);
-  TupleDescInitEntry(tupdesc, (AttrNumber) 5, "block_free",  INT8OID, -1, 0);
+  TupleDescInitEntry(tupdesc, (AttrNumber) 4, "block_free",  INT8OID, -1, 0);
 
   tupdesc = BlessTupleDesc(tupdesc);
 
@@ -423,8 +422,7 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo)
   values[0] = CStringGetTextDatum(filename);
   values[1] = Int64GetDatum(pageSize);
   values[2] = Int64GetDatum(st.st_size/pageSize);
-  values[3] = Int64GetDatum( sysconf(_SC_PHYS_PAGES) );   /* total page cache */
-  values[4] = Int64GetDatum( sysconf(_SC_AVPHYS_PAGES) ); /* free page cache */
+  values[3] = Int64GetDatum( sysconf(_SC_AVPHYS_PAGES) ); /* free page cache */
 
   memset(nulls, 0, sizeof(nulls));