Manually switch the archive WAL log file in PostgreSQL
pg_switch_wal()
is a system function which forces PostgreSQL to switch to a new WAL file
postgres=# select pg_switch_wal();
pg_switch_wal
---------------
0/9000078
(1 row)
postgres=# select pg_switch_wal();
pg_switch_wal
---------------
0/A000160
(1 row)
For check the filename with this switch id:
postgres=# SELECT pg_walfile_name(pg_switch_wal());
pg_walfile_name
--------------------------
00000001000000000000000B
(1 row)
Check the location for archive files:
