nasa=# select pg_current_wal_insert_lsn();
pg_current_wal_insert_lsn
---------------------------
0/17A0F98
(1 row)
nasa=# select pg_walfile_name('0/17A0F98');------------>>>>注意此处的单引号
pg_walfile_name
--------------------------
000000010000000000000001
(1 row)
nasa=# select version();
version
------------------------------------------------------------------------------------------------------------
PostgreSQL 10beta2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit
(1 row)
nasa=#
参考自:
https://www.postgresql.org/docs/10/static/functions-admin.html