I can't find pg_resetxlog under /usr/bin.
postgres (PostgreSQL) 10.7 (Ubuntu 10.7-1.pgdg16.04+1)
cd /usr/bin
postgres@node-1:/usr/bin$ ./pg_resetxlog
-su: ./pg_resetxlog: No such file or directory
postgresqlpostgresql-10
I can't find pg_resetxlog under /usr/bin.
postgres (PostgreSQL) 10.7 (Ubuntu 10.7-1.pgdg16.04+1)
cd /usr/bin
postgres@node-1:/usr/bin$ ./pg_resetxlog
-su: ./pg_resetxlog: No such file or directory
Best Answer
That's because from version 10 it has been renamed to
pg_resetwal
. And the binary is located in/usr/lib/postgresql/<version>/bin
.The
pg_xlog
directory was renamed topg_wal
in version 10 and several functions, tools and options as well, to reflect that change. See Postgres 10 release notes: