数据仓库服务 GAUSSDB(DWS)-备份控制函数:pg_xlogfile_name_offset(location text)

时间:2024-10-21 16:50:41

pg_xlogfile_name_offset(location text)

描述:将事务日志的位置字符串转换为文件名并返回在文件中的字节偏移量。

返回值类型:text,integer

备注:可以使用pg_xlogfile_name_offset从前述函数的返回结果中抽取相应的事务日志文件名称和字节偏移量。例如:

1
2
3
4
5
6
7
SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
NOTICE:  pg_stop_backup cleanup done, waiting for required WAL segments to be archived
NOTICE:  pg_stop_backup complete, all required WAL segments have been archived
        file_name         | file_offset 
--------------------------+-------------
000000010000000000000003  |         272
(1 row)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0300.html