Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
8.20. pg_lsn Type
Prev UpChapter 8. Data TypesHome Next

8.20. pg_lsn Type#

Thepg_lsn data type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the WAL. This type is a representation ofXLogRecPtr and an internal system type ofPostgreSQL.

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,16/B374D848. Thepg_lsn type supports the standard comparison operators, like= and>. Two LSNs can be subtracted using the- operator; the result is the number of bytes separating those write-ahead log locations. Also the number of bytes can be added into and subtracted from LSN using the+(pg_lsn,numeric) and-(pg_lsn,numeric) operators, respectively. Note that the calculated LSN should be in the range ofpg_lsn type, i.e., between0/0 andFFFFFFFF/FFFFFFFF.


Prev Up Next
8.19. Object Identifier Types Home 8.21. Pseudo-Types
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp