Expose sequence page LSN via pg_get_sequence_data.
authorAmit Kapila <akapila@postgresql.org>
Mon, 6 Oct 2025 08:27:22 +0000 (08:27 +0000)
committerAmit Kapila <akapila@postgresql.org>
Mon, 6 Oct 2025 08:30:16 +0000 (08:30 +0000)
commitb93172ca59f4ae317b2b9dfbf7f342b237101256
tree50da1941b3bee6231b1b145fdf2cda631f825379
parent42c6b74d8928885135ba35ffdb7fb60602953e2d
Expose sequence page LSN via pg_get_sequence_data.

This patch enhances the pg_get_sequence_data function to include the
page-level LSN (Log Sequence Number) of the sequence. This additional
metadata will be used by upcoming patches to support synchronization
of sequences during logical replication.

By exposing the LSN, we enable more accurate tracking of sequence
changes, which is essential for maintaining consistency across
replicated nodes.

Author: vignesh C <vignesh21@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
src/backend/commands/sequence.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/test/regress/expected/sequence.out
src/test/regress/sql/sequence.sql