Fix failure to follow the directions when "init" fork was added.
authorFujii Masao
Mon, 11 Aug 2014 14:19:23 +0000 (23:19 +0900)
committerFujii Masao
Mon, 11 Aug 2014 14:19:23 +0000 (23:19 +0900)
Specifically this commit updates forkname_to_number() so that the HINT
message includes "init" fork, and also adds the description of "init" fork
into pg_relation_size() document.

This is a part of the commit 2d00190495b22e0d0ba351b2cda9c95fb2e3d083
which has fixed the same oversight in master and 9.4. Back-patch to
9.1 where "init" fork was added.

doc/src/sgml/func.sgml
src/backend/catalog/catalog.c

index 86d3a917b9240f90e891c312f81ef874e9ad41bf..ac25d9203583e7be49f9de6e2f8262a8a25373de 100644 (file)
@@ -15596,7 +15596,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
        bigint
        
         Disk space used by the specified fork ('main',
-        'fsm' or 'vm')
+        'fsm''vm', or 'init')
         of the specified table or index
        
       
@@ -15730,6 +15730,12 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
        (see ) associated with the relation.
       
      
+     
+      
+       'init' returns the size of the initialization fork,
+       if any, (see ) associated with the relation.
+      
+     
     
    
 
index ea888448904896da1bfdf34f32b6e724ede1c294..d021a3894c47b2e67dff1e7981b8b7bdc9a70b3d 100644 (file)
@@ -61,7 +61,8 @@ forkname_to_number(char *forkName)
    ereport(ERROR,
            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
             errmsg("invalid fork name"),
-            errhint("Valid fork names are \"main\", \"fsm\", and \"vm\".")));
+            errhint("Valid fork names are \"main\", \"fsm\", "
+                    "\"vm\", and \"init\".")));
    return InvalidForkNumber;   /* keep compiler quiet */
 }