View Source Postgrex.PgOutput.Lsn (postgrex_pgoutput v0.2.0)

LSN (Log Sequence Number) is a pointer to a location in the WAL.

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.

This module provides utility functions for encoding/decoding Lsn's

Link to this section Summary

Link to this section Types

Link to this section Functions

@spec decode(binary()) :: t()
Link to this function

decode_string(lsn_string)

View Source
@spec decode_string(binary()) :: t()
@spec encode(t()) :: binary()
@spec encode_int64(t()) :: integer()
@spec encode_string(t()) :: binary()