{"Entry":{"collection":"type","key":"pg_lsn","name":"pg_lsn","aliases":[],"metadata":{"aliases":[],"category":"Other built-in types","content_hash":"cb04a80e2202610cc8d346a30180e14318d8efea7e872e3bea255c00e794f05b","derived_content_hash":"4f1cd55fe0e88807e0662c23a742211f19049a13f37277866243b36907fba046","imported_at":"2026-09-30T00:40:36.372675+08:00","name":"pg_lsn","name_zh":"","slug":"pg_lsn","summary":"PostgreSQL Log Sequence Number"}},"Definition":{"Collection":"type","Key":"pg_lsn","SourceDatabase":"center","Version":"18","SourceTable":"data_type","SourceKey":"pg_lsn","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"aliases":[],"casts":[],"catalog":{"array_type_name":"_pg_lsn","array_type_oid":"3221","descr":"PostgreSQL LSN","oid":"3220","typacl":"_null_","typalign":"d","typanalyze":"-","typarray":"0","typbasetype":"0","typbyval":"FLOAT8PASSBYVAL","typcategory":"U","typcollation":"0","typdefault":"_null_","typdefaultbin":"_null_","typdelim":"','","typelem":"0","typinput":"pg_lsn_in","typisdefined":"t","typispreferred":"f","typlen":"8","typmodin":"-","typmodout":"-","typname":"pg_lsn","typnamespace":"pg_catalog","typndims":"0","typnotnull":"f","typoutput":"pg_lsn_out","typowner":"POSTGRES","typreceive":"pg_lsn_recv","typrelid":"0","typsend":"pg_lsn_send","typstorage":"p","typsubscript":"-","typtype":"b","typtypmod":"-1"},"comparison_data":{"aliases":[],"casts":[],"catalog":{"array_type_name":"_pg_lsn","typacl":"_null_","typalign":"d","typanalyze":"-","typarray":"_pg_lsn","typbasetype":"0","typbyval":"FLOAT8PASSBYVAL","typcategory":"U","typcollation":"0","typdefault":"_null_","typdefaultbin":"_null_","typdelim":",","typelem":"0","typinput":"pg_lsn_in","typisdefined":"t","typispreferred":"f","typlen":"8","typmodin":"-","typmodout":"-","typname":"pg_lsn","typndims":"0","typnotnull":"f","typoutput":"pg_lsn_out","typreceive":"pg_lsn_recv","typrelid":"0","typsend":"pg_lsn_send","typstorage":"p","typsubscript":"-","typtype":"b","typtypmod":"-1"},"facts":[{"label":"Catalog name","value":"pg_catalog.pg_lsn"},{"label":"Declared length","value":"8 bytes"},{"label":"Input function","value":"pg_lsn_in"},{"label":"Output function","value":"pg_lsn_out"},{"label":"Storage strategy","value":"plain"},{"label":"Type OID","value":"3220"},{"label":"Type kind","value":"Base type"}],"operator_classes":[{"opcdefault":"f","opcfamily":"brin/pg_lsn_bloom_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_bloom_ops"},{"opcdefault":"f","opcfamily":"brin/pg_lsn_minmax_multi_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_minmax_multi_ops"},{"opcdefault":"t","opcfamily":"brin/pg_lsn_minmax_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_minmax_ops"},{"opcdefault":"t","opcfamily":"btree/pg_lsn_ops","opcintype":"pg_lsn","opckeytype":"0","opcmethod":"btree","opcname":"pg_lsn_ops"},{"opcdefault":"t","opcfamily":"hash/pg_lsn_ops","opcintype":"pg_lsn","opckeytype":"0","opcmethod":"hash","opcname":"pg_lsn_ops"}],"operators":[{"oprcanhash":"f","oprcanmerge":"f","oprcode":"numeric_pl_pg_lsn","oprcom":"+(pg_lsn,numeric)","oprjoin":"-","oprkind":"b","oprleft":"numeric","oprname":"+","oprnegate":"0","oprrest":"-","oprresult":"pg_lsn","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_ge","oprcom":"\u003c=(pg_lsn,pg_lsn)","oprjoin":"scalargejoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003e=","oprnegate":"\u003c(pg_lsn,pg_lsn)","oprrest":"scalargesel","oprresult":"bool","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_gt","oprcom":"\u003c(pg_lsn,pg_lsn)","oprjoin":"scalargtjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003e","oprnegate":"\u003c=(pg_lsn,pg_lsn)","oprrest":"scalargtsel","oprresult":"bool","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_le","oprcom":"\u003e=(pg_lsn,pg_lsn)","oprjoin":"scalarlejoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c=","oprnegate":"\u003e(pg_lsn,pg_lsn)","oprrest":"scalarlesel","oprresult":"bool","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_lt","oprcom":"\u003e(pg_lsn,pg_lsn)","oprjoin":"scalarltjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c","oprnegate":"\u003e=(pg_lsn,pg_lsn)","oprrest":"scalarltsel","oprresult":"bool","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_mi","oprcom":"0","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"-","oprnegate":"0","oprrest":"-","oprresult":"numeric","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_mii","oprcom":"0","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"-","oprnegate":"0","oprrest":"-","oprresult":"pg_lsn","oprright":"numeric"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_ne","oprcom":"\u003c\u003e(pg_lsn,pg_lsn)","oprjoin":"neqjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c\u003e","oprnegate":"=(pg_lsn,pg_lsn)","oprrest":"neqsel","oprresult":"bool","oprright":"pg_lsn"},{"oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_pli","oprcom":"+(numeric,pg_lsn)","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"+","oprnegate":"0","oprrest":"-","oprresult":"pg_lsn","oprright":"numeric"},{"oprcanhash":"t","oprcanmerge":"t","oprcode":"pg_lsn_eq","oprcom":"=(pg_lsn,pg_lsn)","oprjoin":"eqjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"=","oprnegate":"\u003c\u003e(pg_lsn,pg_lsn)","oprrest":"eqsel","oprresult":"bool","oprright":"pg_lsn"}],"ranges":[]},"comparison_hash":"a9790a62bd83787e10868f41c379156f1397d93a9f50aed2e1f08feb776aadbd","coverage":"source inventory; exact declared input types for operator classes","description":["PostgreSQL Log Sequence Number"],"description_zh":"PostgreSQL 日志序列号","description_zh_html":"\u003cp\u003ePostgreSQL 日志序列号\u003c/p\u003e\u003ch3\u003e同版本中文手册节选\u003c/h3\u003e\u003cp\u003e\n\u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e 数据类型可用于存储 LSN（日志序列号）数据。LSN 是指向 WAL 中某个位置的指针。该类型是\n    \u003ccode class=\"type\"\u003eXLogRecPtr\u003c/code\u003e 的一种表示形式，也是\n    \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 的内部系统类型之一。\n   \u003c/p\u003e\u003cp\u003e\n    在内部，LSN 是一个 64 位整数，表示预写式日志流中的字节位置。它打印为两个最多 8 位的十六进制数，中间以斜线分隔，例如\n    \u003ccode class=\"literal\"\u003e16/B374D848\u003c/code\u003e。\u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e 类型支持标准比较操作符，如 \u003ccode class=\"literal\"\u003e=\u003c/code\u003e 和\n    \u003ccode class=\"literal\"\u003e\u0026gt;\u003c/code\u003e。两个 LSN 可以用 \u003ccode class=\"literal\"\u003e-\u003c/code\u003e\n    操作符相减，结果是这两个预写式日志位置之间相隔的字节数。此外，还可以分别使用 \u003ccode class=\"literal\"\u003e+(pg_lsn,numeric)\u003c/code\u003e 和\n    \u003ccode class=\"literal\"\u003e-(pg_lsn,numeric)\u003c/code\u003e 操作符，在 LSN 上加减字节数。请注意，计算得到的 LSN 必须位于 \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e 类型的取值范围内，也就是在 \u003ccode class=\"literal\"\u003e0/0\u003c/code\u003e 和\n    \u003ccode class=\"literal\"\u003eFFFFFFFF/FFFFFFFF\u003c/code\u003e 之间。\n   \u003c/p\u003e\u003cp\u003e\u003ca href=\"/zh/docs/18/datatype-pg-lsn.html\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","facts":[{"label":"Catalog name","value":"pg_catalog.pg_lsn"},{"label":"Type OID","value":"3220"},{"label":"Type kind","value":"Base type"},{"label":"Declared length","value":"8 bytes"},{"label":"Storage strategy","value":"plain"},{"label":"Input function","value":"pg_lsn_in"},{"label":"Output function","value":"pg_lsn_out"}],"facts_zh":[{"label":"目录名称","value":"pg_catalog.pg_lsn"},{"label":"类型 OID","value":"3220"},{"label":"类型种类","value":"基础类型"},{"label":"声明长度","value":"8 字节"},{"label":"存储策略","value":"plain"},{"label":"输入函数","value":"pg_lsn_in"},{"label":"输出函数","value":"pg_lsn_out"}],"manual_documentation":"dedicated family chapter","manual_html":"\u003cdiv class=\"sect1\" id=\"DATATYPE-PG-LSN\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e8.20. \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e Type \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eThe \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e 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 of \u003ccode class=\"type\"\u003eXLogRecPtr\u003c/code\u003e and an internal system type of \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eInternally, 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, \u003ccode class=\"literal\"\u003e16/B374D848\u003c/code\u003e. The \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e type supports the standard comparison operators, like \u003ccode class=\"literal\"\u003e=\u003c/code\u003e and \u003ccode class=\"literal\"\u003e\u0026gt;\u003c/code\u003e. Two LSNs can be subtracted using the \u003ccode class=\"literal\"\u003e-\u003c/code\u003e 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 \u003ccode class=\"literal\"\u003e+(pg_lsn,numeric)\u003c/code\u003e and \u003ccode class=\"literal\"\u003e-(pg_lsn,numeric)\u003c/code\u003e operators, respectively. Note that the calculated LSN should be in the range of \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e type, i.e., between \u003ccode class=\"literal\"\u003e0/0\u003c/code\u003e and \u003ccode class=\"literal\"\u003eFFFFFFFF/FFFFFFFF\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e","manual_path":"datatype-pg-lsn.html","operator_classes":[{"opcdefault":"t","opcfamily":"btree/pg_lsn_ops","opcintype":"pg_lsn","opckeytype":"0","opcmethod":"btree","opcname":"pg_lsn_ops","opcnamespace":"pg_catalog","opcowner":"POSTGRES"},{"opcdefault":"t","opcfamily":"hash/pg_lsn_ops","opcintype":"pg_lsn","opckeytype":"0","opcmethod":"hash","opcname":"pg_lsn_ops","opcnamespace":"pg_catalog","opcowner":"POSTGRES"},{"opcdefault":"t","opcfamily":"brin/pg_lsn_minmax_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_minmax_ops","opcnamespace":"pg_catalog","opcowner":"POSTGRES"},{"opcdefault":"f","opcfamily":"brin/pg_lsn_minmax_multi_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_minmax_multi_ops","opcnamespace":"pg_catalog","opcowner":"POSTGRES"},{"opcdefault":"f","opcfamily":"brin/pg_lsn_bloom_ops","opcintype":"pg_lsn","opckeytype":"pg_lsn","opcmethod":"brin","opcname":"pg_lsn_bloom_ops","opcnamespace":"pg_catalog","opcowner":"POSTGRES"}],"operators":[{"descr":"equal","oid":"3222","oprcanhash":"t","oprcanmerge":"t","oprcode":"pg_lsn_eq","oprcom":"=(pg_lsn,pg_lsn)","oprjoin":"eqjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"=","oprnamespace":"pg_catalog","oprnegate":"\u003c\u003e(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"eqsel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"not equal","oid":"3223","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_ne","oprcom":"\u003c\u003e(pg_lsn,pg_lsn)","oprjoin":"neqjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c\u003e","oprnamespace":"pg_catalog","oprnegate":"=(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"neqsel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"less than","oid":"3224","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_lt","oprcom":"\u003e(pg_lsn,pg_lsn)","oprjoin":"scalarltjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c","oprnamespace":"pg_catalog","oprnegate":"\u003e=(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"scalarltsel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"greater than","oid":"3225","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_gt","oprcom":"\u003c(pg_lsn,pg_lsn)","oprjoin":"scalargtjoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003e","oprnamespace":"pg_catalog","oprnegate":"\u003c=(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"scalargtsel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"less than or equal","oid":"3226","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_le","oprcom":"\u003e=(pg_lsn,pg_lsn)","oprjoin":"scalarlejoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003c=","oprnamespace":"pg_catalog","oprnegate":"\u003e(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"scalarlesel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"greater than or equal","oid":"3227","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_ge","oprcom":"\u003c=(pg_lsn,pg_lsn)","oprjoin":"scalargejoinsel","oprkind":"b","oprleft":"pg_lsn","oprname":"\u003e=","oprnamespace":"pg_catalog","oprnegate":"\u003c(pg_lsn,pg_lsn)","oprowner":"POSTGRES","oprrest":"scalargesel","oprresult":"bool","oprright":"pg_lsn"},{"descr":"minus","oid":"3228","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_mi","oprcom":"0","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"-","oprnamespace":"pg_catalog","oprnegate":"0","oprowner":"POSTGRES","oprrest":"-","oprresult":"numeric","oprright":"pg_lsn"},{"descr":"add","oid":"5025","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_pli","oprcom":"+(numeric,pg_lsn)","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"+","oprnamespace":"pg_catalog","oprnegate":"0","oprowner":"POSTGRES","oprrest":"-","oprresult":"pg_lsn","oprright":"numeric"},{"descr":"add","oid":"5026","oprcanhash":"f","oprcanmerge":"f","oprcode":"numeric_pl_pg_lsn","oprcom":"+(pg_lsn,numeric)","oprjoin":"-","oprkind":"b","oprleft":"numeric","oprname":"+","oprnamespace":"pg_catalog","oprnegate":"0","oprowner":"POSTGRES","oprrest":"-","oprresult":"pg_lsn","oprright":"pg_lsn"},{"descr":"subtract","oid":"5027","oprcanhash":"f","oprcanmerge":"f","oprcode":"pg_lsn_mii","oprcom":"0","oprjoin":"-","oprkind":"b","oprleft":"pg_lsn","oprname":"-","oprnamespace":"pg_catalog","oprnegate":"0","oprowner":"POSTGRES","oprrest":"-","oprresult":"pg_lsn","oprright":"numeric"}],"ranges":[],"related":[{"label":"pg_type catalog","url":"/wiki/catalog/pg_type/?v=18"},{"label":"pg_cast catalog","url":"/wiki/catalog/pg_cast/?v=18"},{"label":"pg_operator catalog","url":"/wiki/catalog/pg_operator/?v=18"},{"label":"pg_opclass catalog","url":"/wiki/catalog/pg_opclass/?v=18"},{"label":"Arrays","url":"/wiki/type/arrays/?v=18"},{"label":"brin index access method","url":"/wiki/indexam/brin/?v=18"},{"label":"btree index access method","url":"/wiki/indexam/btree/?v=18"},{"label":"hash index access method","url":"/wiki/indexam/hash/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","manual_sha256":{"arrays.html":"0e1d5c5a7b4a949d4439995f44f74ad4264e050d16eb9ad2a850fbaee04032df","catalog-pg-type.html":"ea9c9313bab8e92a7da18ebc50c7ff1f908dd80999a7e0ca3bbc82ba626c58d4","datatype-binary.html":"0c03ec47b76e37888a3da7f5dcfd340128a5d356642a85185cc9ebe17856a904","datatype-bit.html":"c49124aad561636c18080b9e09572fde7785a6b9eae86f5a33283f0fd6774c37","datatype-boolean.html":"b633f663e6c8276e7056287640c413aa79dbc15d5353cee0d41653d58d376956","datatype-character.html":"c73eebe413ea709a7792e4cfc3cfe9fb68cb496ebe83c3ebaa9d09f8c40d0f73","datatype-datetime.html":"e366275d8b13845bfa4ef0d68faa093e5f3ecb708a1ec870cbcbf7e425b85699","datatype-enum.html":"cab38e53222e30cc94b24de4b33634fd22d7c93f58ebcf35f646c9b8da78fae8","datatype-geometric.html":"0eb3053cfe7d6b0a4b5592c5d7af8d97cae527e87f063c5793413bcba5c14cd9","datatype-json.html":"650162a05b660146b500a205d523374d00aee117a6a6240d30262be51b6e33e5","datatype-money.html":"8b29c14b90679683ac5c472b59a0a7e2853f32cc7db43fab417b2697a6879964","datatype-net-types.html":"96846e641cc37727ddcd8b8a1aa0dbe33cd9787760a2b4efb0dcb9403d5be63f","datatype-numeric.html":"b74619f7ac2f1ca9f85c48073df78c33dd30e464e61baba6008634534edcb500","datatype-oid.html":"8b3360302225f08ae72716ce1804596de95b568e5d31f788cb4597427b28cc38","datatype-pg-lsn.html":"339172f5107cc7eb7139bec911277647219e92a532cebd0f3da0a5dacf8195af","datatype-pseudo.html":"c7cf0b8214304bd8702c95f2142671ae5f0d631f83717f9c07d9e1f2579961b4","datatype-textsearch.html":"4b15e05be8b49a71b28aea22f2c46d0dbf639a91e7b4fe129a4c737c6daad47c","datatype-uuid.html":"292b307b3223c6182bdba687e7f69e6dca9038430143ad79d56327f6ed4c3246","datatype-xml.html":"061fc2295b7b69be704f0a741b8decd10ad721059f871fb0243c669bb54d7822","datatype.html":"e581f67c74e42006289638c8659e9b338adbfd7f068bd8bf2b3be3880fcd2254","domains.html":"82d486973ccc35d14276627a67ac76b434452f23f9ed4d8aa3fbb01fdf285fc2","functions-info.html":"78ac80bf81da2e4f4a33f3b850faa86f0f58ec54a083d6c31da557907de0df87","rangetypes.html":"e4960abc7ce8e51d794f94f1e57b099d30b7f75dd7f2b23a960eef91f6291c33","rowtypes.html":"74f99e029c3a9edfd3e18810ba3c8cb66d3aada91eb67b86476560871e6617e9","sql-createdomain.html":"e94f927196de1b0ea1ce35cd4603c1f6f544439adcc0edf1c4222358e832245b"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_files":{"doc/src/sgml/datatype.sgml":"86328daa77e20d81d222376ec0306d9841a17104e436c08d138eb763aefb3700","src/include/catalog/pg_am.dat":"b3cb86b102a42fb0024cbd99779c9897afb40d12a71f5cc5a0e5aee7ff2f9969","src/include/catalog/pg_am.h":"3426799df799f32163fcc0765f43dbdb5e88e626acf31284fef9fc6014b69d8e","src/include/catalog/pg_cast.dat":"97911281ca2c81917394ccb2ec13367e37c6801fd461d5e1a3d2f28b911b46b2","src/include/catalog/pg_cast.h":"de585c7df687d698e7d1d100dce8a794ac9da52414ea48169191019178c8f053","src/include/catalog/pg_opclass.dat":"4ee7d3619a6aa106e1c0db55de903931c7d11b1c60ba053a022519c55f8ee668","src/include/catalog/pg_opclass.h":"9c218537806c8ef0398302faaca7f91315dfc1198c48706cebffb479b68defaf","src/include/catalog/pg_operator.dat":"5d35b9b2ef5f9797cc815263927ef8a12367fedace53e828b4e8b320e2a7f703","src/include/catalog/pg_operator.h":"621b18cfffe102413d79b746ce7a10f77fc60fdd097bac34c22b31070d3ee3c4","src/include/catalog/pg_opfamily.dat":"3b694879027b858f2ecf1fa1152b7e30c6e15a216ba99c2384291c30e9d52311","src/include/catalog/pg_opfamily.h":"e1f5fc8aebd3042df847455bf66bf755f768c2aa8a9b03d22f7ec8563eba59c0","src/include/catalog/pg_proc.dat":"1f934ce80d460159dda137714374a35f9896315ea2476709cbb4da13b38ef95a","src/include/catalog/pg_proc.h":"f7d59f07c5b95e2f3c7141762a0f576e8a3af7581ba54c27537f4d500472bea5","src/include/catalog/pg_range.dat":"5c2271f8e89e9378d1887204e5785060b77405b5f0ff3e6c719250c9c1dcfcc4","src/include/catalog/pg_range.h":"45546d952b5181f989bd9234721897fc2b37005c8e49ce2ddc156f26974c3ca4","src/include/catalog/pg_type.dat":"5f5887b75677cba2d4a1a0cfeb355df5ed91f85d385fac88bd8d7c605b3578f9","src/include/catalog/pg_type.h":"8fb198749fd82b6c1818a3c18455f226f66116fcfeb3d4959c65ce3fda22802e"},"source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"sections_zh":[],"signature":"pg_lsn","sources":[{"label":"PostgreSQL 18 English manual","path":"datatype-pg-lsn.html","sha256":"339172f5107cc7eb7139bec911277647219e92a532cebd0f3da0a5dacf8195af","url":"/docs/18/datatype-pg-lsn.html"},{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}],"tables_zh":[],"zh_from":{"authored_translation":"preserved-translation-of-reverified-type-description","body_sha256":"6304ee1941d123f3631d09e0ee063b29a82a2c8d3f1fae0aa209e498a7661ab2","kind":"same-version-chinese-manual-with-preserved-translation-of-reverified-type-description","manual":{"anchor":"","build_id":107,"extraction":"concept-introduction","fragment_sha256":"c28d439964f1615a87573f710193ddffa83260590e0bffeb86867d5bf1eae706","locale":"zh-Hans","page_key":"datatype-pg-lsn.html","source_hash":"25b07f9a666bcd9af7cccfbf03261ff923525ead4cb2f488667c2d74fd7bf0a9","source_revision":"unknown:rendered-translation-baseline","translated_from_revision":null,"translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","url":"/zh/docs/18/datatype-pg-lsn.html","version":"18"},"runtime_rerun":false,"source_facts_revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","summary_translation":{"english_description_sha256":"97abe9d56336cbb9f2aafacd7e7e02596a992ed02726b8c4eca017cf8ae85dfb","key":"pg_lsn","kind":"preserved-translation-of-reverified-type-description","localized_description_sha256":"6e56fd638ab963e15d1cde524c3921da4c6bc00fbdd56ba333293cb9f24eb510","original_localization_sources":[{"language":"zh","matched_nodes":["#DATATYPE-MONEY/div[2]/div[1]/table[0]/tbody[2]/tr[0]/td[1]"],"method":"same-major semantic node","sha256":"6a3a18c17225f00376744bdae7a7f782102e9a0cce0bc2491e7669a43283455e","url":"/docs/18/datatype-money.html"},{"language":"zh","matched_nodes":["#DATATYPE-PG-LSN/div[0]","#DATATYPE-PG-LSN/p[2]","#DATATYPE-PG-LSN/p[3]"],"method":"same-major semantic node","sha256":"7bddfc561f8d4417e91610f8e810d4eabb0e0eb4f48269075de90ce025897f24","url":"/docs/18/datatype-pg-lsn.html"}],"source_database":"pgweb","table":"data_type","version":"18"}}},"ManualEvidence":{"manual_path":"datatype-pg-lsn.html","release":{"channel":"stable","label":"18.6","major":"18","manual_sha256":{"arrays.html":"0e1d5c5a7b4a949d4439995f44f74ad4264e050d16eb9ad2a850fbaee04032df","catalog-pg-type.html":"ea9c9313bab8e92a7da18ebc50c7ff1f908dd80999a7e0ca3bbc82ba626c58d4","datatype-binary.html":"0c03ec47b76e37888a3da7f5dcfd340128a5d356642a85185cc9ebe17856a904","datatype-bit.html":"c49124aad561636c18080b9e09572fde7785a6b9eae86f5a33283f0fd6774c37","datatype-boolean.html":"b633f663e6c8276e7056287640c413aa79dbc15d5353cee0d41653d58d376956","datatype-character.html":"c73eebe413ea709a7792e4cfc3cfe9fb68cb496ebe83c3ebaa9d09f8c40d0f73","datatype-datetime.html":"e366275d8b13845bfa4ef0d68faa093e5f3ecb708a1ec870cbcbf7e425b85699","datatype-enum.html":"cab38e53222e30cc94b24de4b33634fd22d7c93f58ebcf35f646c9b8da78fae8","datatype-geometric.html":"0eb3053cfe7d6b0a4b5592c5d7af8d97cae527e87f063c5793413bcba5c14cd9","datatype-json.html":"650162a05b660146b500a205d523374d00aee117a6a6240d30262be51b6e33e5","datatype-money.html":"8b29c14b90679683ac5c472b59a0a7e2853f32cc7db43fab417b2697a6879964","datatype-net-types.html":"96846e641cc37727ddcd8b8a1aa0dbe33cd9787760a2b4efb0dcb9403d5be63f","datatype-numeric.html":"b74619f7ac2f1ca9f85c48073df78c33dd30e464e61baba6008634534edcb500","datatype-oid.html":"8b3360302225f08ae72716ce1804596de95b568e5d31f788cb4597427b28cc38","datatype-pg-lsn.html":"339172f5107cc7eb7139bec911277647219e92a532cebd0f3da0a5dacf8195af","datatype-pseudo.html":"c7cf0b8214304bd8702c95f2142671ae5f0d631f83717f9c07d9e1f2579961b4","datatype-textsearch.html":"4b15e05be8b49a71b28aea22f2c46d0dbf639a91e7b4fe129a4c737c6daad47c","datatype-uuid.html":"292b307b3223c6182bdba687e7f69e6dca9038430143ad79d56327f6ed4c3246","datatype-xml.html":"061fc2295b7b69be704f0a741b8decd10ad721059f871fb0243c669bb54d7822","datatype.html":"e581f67c74e42006289638c8659e9b338adbfd7f068bd8bf2b3be3880fcd2254","domains.html":"82d486973ccc35d14276627a67ac76b434452f23f9ed4d8aa3fbb01fdf285fc2","functions-info.html":"78ac80bf81da2e4f4a33f3b850faa86f0f58ec54a083d6c31da557907de0df87","rangetypes.html":"e4960abc7ce8e51d794f94f1e57b099d30b7f75dd7f2b23a960eef91f6291c33","rowtypes.html":"74f99e029c3a9edfd3e18810ba3c8cb66d3aada91eb67b86476560871e6617e9","sql-createdomain.html":"e94f927196de1b0ea1ce35cd4603c1f6f544439adcc0edf1c4222358e832245b"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_files":{"doc/src/sgml/datatype.sgml":"86328daa77e20d81d222376ec0306d9841a17104e436c08d138eb763aefb3700","src/include/catalog/pg_am.dat":"b3cb86b102a42fb0024cbd99779c9897afb40d12a71f5cc5a0e5aee7ff2f9969","src/include/catalog/pg_am.h":"3426799df799f32163fcc0765f43dbdb5e88e626acf31284fef9fc6014b69d8e","src/include/catalog/pg_cast.dat":"97911281ca2c81917394ccb2ec13367e37c6801fd461d5e1a3d2f28b911b46b2","src/include/catalog/pg_cast.h":"de585c7df687d698e7d1d100dce8a794ac9da52414ea48169191019178c8f053","src/include/catalog/pg_opclass.dat":"4ee7d3619a6aa106e1c0db55de903931c7d11b1c60ba053a022519c55f8ee668","src/include/catalog/pg_opclass.h":"9c218537806c8ef0398302faaca7f91315dfc1198c48706cebffb479b68defaf","src/include/catalog/pg_operator.dat":"5d35b9b2ef5f9797cc815263927ef8a12367fedace53e828b4e8b320e2a7f703","src/include/catalog/pg_operator.h":"621b18cfffe102413d79b746ce7a10f77fc60fdd097bac34c22b31070d3ee3c4","src/include/catalog/pg_opfamily.dat":"3b694879027b858f2ecf1fa1152b7e30c6e15a216ba99c2384291c30e9d52311","src/include/catalog/pg_opfamily.h":"e1f5fc8aebd3042df847455bf66bf755f768c2aa8a9b03d22f7ec8563eba59c0","src/include/catalog/pg_proc.dat":"1f934ce80d460159dda137714374a35f9896315ea2476709cbb4da13b38ef95a","src/include/catalog/pg_proc.h":"f7d59f07c5b95e2f3c7141762a0f576e8a3af7581ba54c27537f4d500472bea5","src/include/catalog/pg_range.dat":"5c2271f8e89e9378d1887204e5785060b77405b5f0ff3e6c719250c9c1dcfcc4","src/include/catalog/pg_range.h":"45546d952b5181f989bd9234721897fc2b37005c8e49ce2ddc156f26974c3ca4","src/include/catalog/pg_type.dat":"5f5887b75677cba2d4a1a0cfeb355df5ed91f85d385fac88bd8d7c605b3578f9","src/include/catalog/pg_type.h":"8fb198749fd82b6c1818a3c18455f226f66116fcfeb3d4959c65ce3fda22802e"},"source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"PostgreSQL 18 English manual","path":"datatype-pg-lsn.html","sha256":"339172f5107cc7eb7139bec911277647219e92a532cebd0f3da0a5dacf8195af","url":"/docs/18/datatype-pg-lsn.html"},{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}]},"MeasuredEvidence":{}},"Text":{"Collection":"type","Key":"pg_lsn","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_lsn","Summary":"PostgreSQL Log Sequence Number","BodyHTML":"\u003cdiv id=\"DATATYPE-PG-LSN\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003e8.20. \u003ccode\u003epg_lsn\u003c/code\u003e Type \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eThe \u003ccode\u003epg_lsn\u003c/code\u003e 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 of \u003ccode\u003eXLogRecPtr\u003c/code\u003e and an internal system type of \u003cspan\u003ePostgreSQL\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eInternally, 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, \u003ccode\u003e16/B374D848\u003c/code\u003e. The \u003ccode\u003epg_lsn\u003c/code\u003e type supports the standard comparison operators, like \u003ccode\u003e=\u003c/code\u003e and \u003ccode\u003e\u0026gt;\u003c/code\u003e. Two LSNs can be subtracted using the \u003ccode\u003e-\u003c/code\u003e 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 \u003ccode\u003e+(pg_lsn,numeric)\u003c/code\u003e and \u003ccode\u003e-(pg_lsn,numeric)\u003c/code\u003e operators, respectively. Note that the calculated LSN should be in the range of \u003ccode\u003epg_lsn\u003c/code\u003e type, i.e., between \u003ccode\u003e0/0\u003c/code\u003e and \u003ccode\u003eFFFFFFFF/FFFFFFFF\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"c5e51c835fab005cbdc4651660aabe562c3bfd859b49ee31f4ba357a2c31bee6","Payload":{"description":["PostgreSQL Log Sequence Number"],"manual_html":"\u003cdiv class=\"sect1\" id=\"DATATYPE-PG-LSN\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e8.20. \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e Type \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eThe \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e 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 of \u003ccode class=\"type\"\u003eXLogRecPtr\u003c/code\u003e and an internal system type of \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eInternally, 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, \u003ccode class=\"literal\"\u003e16/B374D848\u003c/code\u003e. The \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e type supports the standard comparison operators, like \u003ccode class=\"literal\"\u003e=\u003c/code\u003e and \u003ccode class=\"literal\"\u003e\u0026gt;\u003c/code\u003e. Two LSNs can be subtracted using the \u003ccode class=\"literal\"\u003e-\u003c/code\u003e 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 \u003ccode class=\"literal\"\u003e+(pg_lsn,numeric)\u003c/code\u003e and \u003ccode class=\"literal\"\u003e-(pg_lsn,numeric)\u003c/code\u003e operators, respectively. Note that the calculated LSN should be in the range of \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e type, i.e., between \u003ccode class=\"literal\"\u003e0/0\u003c/code\u003e and \u003ccode class=\"literal\"\u003eFFFFFFFF/FFFFFFFF\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e","related":[{"label":"pg_type catalog","url":"/wiki/catalog/pg_type/?v=18"},{"label":"pg_cast catalog","url":"/wiki/catalog/pg_cast/?v=18"},{"label":"pg_operator catalog","url":"/wiki/catalog/pg_operator/?v=18"},{"label":"pg_opclass catalog","url":"/wiki/catalog/pg_opclass/?v=18"},{"label":"Arrays","url":"/wiki/type/arrays/?v=18"},{"label":"brin index access method","url":"/wiki/indexam/brin/?v=18"},{"label":"btree index access method","url":"/wiki/indexam/btree/?v=18"},{"label":"hash index access method","url":"/wiki/indexam/hash/?v=18"}],"sections":[]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
