关于function pg_switch_xlog() does not exist

pg_switch_xlog()  是9.6版本下的命令,强制手动切换归档日志

postgres=# select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit
(1 row)

postgres=# select pg_switch_xlog();
ERROR: function pg_switch_xlog() does not exist
LINE 1: select pg_switch_xlog();
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

 pg_switch_xlog 在pgsql10以上被pg_switch_wal替换,详见

https://wiki.postgresql.org/wiki/New_in_postgres_10#Renaming_of_.22xlog.22_to_.22wal.22_Globally_.28and_location.2Flsn.29