diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/datatype.sgml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 30fd9bb598d..00ccbe1bb5f 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -181,6 +181,12 @@ </row> <row> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry><productname>PostgreSQL</productname> Log Sequence Number</entry> + </row> + + <row> <entry><type>point</type></entry> <entry></entry> <entry>geometric point on a plane</entry> @@ -4504,6 +4510,32 @@ SELECT * FROM pg_attribute </para> </sect1> + <sect1 id="datatype-pg-lsn"> + <title><acronym>pg_lsn Type</acronym></title> + + <indexterm zone="datatype-pg-lsn"> + <primary>pg_lsn</primary> + </indexterm> + + <para> + The <type>pg_lsn</type> data type can be used to store LSN (Log Sequence + Number) data which is a pointer to a location in the XLOG. This type is a + representation of XLogRecPtr and an internal system type of + <productname>PostgreSQL</productname>. + </para> + + <para> + Internally, an LSN is a 64-bit integer, representing a byte position in + the write-ahead log stream. It is printed as two hexadecimal numbers of + up to 8 digits each, separated by a slash; for example, + <literal>16/B374D848</>. The <type>pg_lsn</type> type supports the + standard comparison operators, like <literal>=</literal> and + <literal>></literal>. Two LSNs can be subtracted using the + <literal>-</literal> operator; the result is the number of bytes separating + those write-ahead log positions. + </para> + </sect1> + <sect1 id="datatype-pseudo"> <title>Pseudo-Types</title> |