Contents
pg_split_walfile_name()
A function for extracting the components of a WAL file name
This entry relates to a PostgreSQL feature which is part of PostgreSQL 16, due to be released in late 2023.
pg_split_walfile_name()
is a system function for extracting the file sequence number and timeline ID from a WAL file name.
pg_split_walfile_name()
was added in PostgreSQL 16.
Usage
pg_split_walfile_name (file_name
text
) →
record (segment_number
numeric
,timeline_id
bigint
)
Change history
Examples
Basic usage example for pg_split_walfile_name()
:
postgres=# SELECT * FROM pg_split_walfile_name('000000010000001000000012'); segment_number | timeline_id ----------------+------------- 4114 | 1 (1 row)
References
- PostgreSQL 16 documentation: Backup Control Functions