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
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityThat's because from version 10 it has been renamed to pg_resetwal
. And in Ubuntu and Debian the binary is located in /usr/lib/postgresql/<version>/bin
.
The pg_xlog
directory was renamed to pg_wal
in version 10 and several functions, tools and options as well, to reflect that change. See Postgres 10 release notes:
Rename write-ahead log directory
pg_xlog
topg_wal
, and rename transaction status directorypg_clog
topg_xact
(Michael Paquier)Users have occasionally thought that these directories contained only inessential log files, and proceeded to remove write-ahead log files or transaction status files manually, causing irrecoverable data loss. These name changes are intended to discourage such errors in future.
Rename SQL functions, tools, and options that reference
xlog
towal
(Robert Haas)For example,
pg_switch_xlog()
becomespg_switch_wal()
,pg_receivexlog
becomespg_receivewal
, and--xlogdir
becomes--waldir
. This is for consistency with the change of thepg_xlog
directory name; in general, thexlog
terminology is no longer used in any user-facing places.