documentation_for_pg_resetxlog_find_max_lsn_from_datafiles.patch

text/plain

Filename: documentation_for_pg_resetxlog_find_max_lsn_from_datafiles.patch
Type: text/plain
Part: 0
Message: Doc Patch and test for Patch to compute Max LSN of Data Pages

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
doc/src/sgml/ref/pg_resetxlog.sgml 18 1
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml
index 27b9ab41..b5c6b3c 100644
--- a/doc/src/sgml/ref/pg_resetxlog.sgml
+++ b/doc/src/sgml/ref/pg_resetxlog.sgml
@@ -30,6 +30,8 @@ PostgreSQL documentation
    <arg choice="opt"><option>-m</option> <replaceable class="parameter">mxid</replaceable></arg>
    <arg choice="opt"><option>-O</option> <replaceable class="parameter">mxoff</replaceable></arg>
    <arg choice="opt"><option>-l</option> <replaceable class="parameter">timelineid</replaceable>,<replaceable class="parameter">fileid</replaceable>,<replaceable class="parameter">seg</replaceable></arg>
+   <arg choice="opt"><option>-P</option></arg>
+   <arg choice="opt"><option>-p</option> <replaceable class="parameter">file-name</replaceable> | <replaceable class="parameter">folder-name</replaceable></arg>
    <arg choice="plain"><replaceable>datadir</replaceable></arg>
   </cmdsynopsis>
  </refsynopsisdiv>
@@ -78,7 +80,7 @@ PostgreSQL documentation
 
   <para>
    The <option>-o</>, <option>-x</>, <option>-e</>,
-   <option>-m</>, <option>-O</>,
+   <option>-m</>, <option>-O</>, <option>-P</>, <option>-p</>, 
    and <option>-l</>
    options allow the next OID, next transaction ID, next transaction ID's
    epoch, next multitransaction ID, next multitransaction offset, and WAL
@@ -135,6 +137,16 @@ PostgreSQL documentation
       largest entry in <filename>pg_xlog</>, use <literal>-l 00000001000000320000004B</> or higher.
      </para>
 
+     <para>
+      If <command>pg_resetxlog</command> complains that it cannot determine
+      valid data for <filename>pg_control</>, and if you do not have or corrupted
+      WAL segment files in the directory <filename>pg_xlog</> under the data directory,
+      then to identify larger WAL segment file from data files we can use the <option>-P</>
+      for finding maximum LSN from the data directory or for from specific
+      file or folder <option>-p <filename>file-name | folder-name</></>. Once larger WAL segment
+      file is found use <option>-l</> option for setting the value.
+     </para>
+
      <note>
       <para>
        <command>pg_resetxlog</command> itself looks at the files in
@@ -145,6 +157,11 @@ PostgreSQL documentation
        entries in an offline archive; or if the contents of
        <filename>pg_xlog</> have been lost entirely.
       </para>
+
+      <para>
+       <option>-p <filename>file-name | folder-name</></> file-name or floder-name 
+       should be absolute path, or relative from data directory.
+      </para>
      </note>
     </listitem>