postgresql函数pg_walfile_name()

张开发
2026/4/25 7:26:37 15 分钟阅读

分享文章

postgresql函数pg_walfile_name()
pg_walfile_name()是postgresql中用于把LSN转换成WAL文件名的一个系统函数在做主备、流复制、pgpool、故障排查时非常常用。1.pg_walfile_name()函数作用根据给定的LSN返回该LSN所在的WAL文件名。SELECT pg_walfile_name(pg_current_wal_lsn());-bash-4.2$ psql psql (15.5) Type help for help. postgres# SELECT pg_walfile_name(pg_current_wal_lsn()); pg_walfile_name -------------------------- 000000050000000000000009 (1 row) postgres#

更多文章