在主库上把WAL位置转换成WAL文件名和偏移量
highgo=# select pg_switch_xlog();
pg_switch_xlog
----------------
0/18F7350
(1 row)
highgo=# select * from pg_xlogfile_name_offset('0/18F7350');
file_name | file_offset
--------------------------+-------------
000000010000000000000001 | 9401168
(1 row)
[highgo@sourcedb pg_xlog]$ pwd
/hgdata/highgo/HighGoDB/data/pg_xlog
[highgo@sourcedb pg_xlog]$ ll
total 16388
-rw-------. 1 highgo highgo 16777216 Mar 27 16:47 000000010000000000000001
drwx------. 2 highgo highgo 4096 Dec 29 16:41 archive_status
[highgo@sourcedb pg_xlog]$
highgo=# select pg_switch_xlog();
pg_switch_xlog
----------------
0/18F7350
(1 row)
highgo=# select * from pg_xlogfile_name_offset('0/18F7350');
file_name | file_offset
--------------------------+-------------
000000010000000000000001 | 9401168
(1 row)
[highgo@sourcedb pg_xlog]$ pwd
/hgdata/highgo/HighGoDB/data/pg_xlog
[highgo@sourcedb pg_xlog]$ ll
total 16388
-rw-------. 1 highgo highgo 16777216 Mar 27 16:47 000000010000000000000001
drwx------. 2 highgo highgo 4096 Dec 29 16:41 archive_status
[highgo@sourcedb pg_xlog]$