Hi Joao, T hanks for testing it, and for checking the order of operations.
> The Discussion: trailer points at David's message > in the CF 4997 thread; I guess it should point at this thread. The patch came out of that thread. That message is where David said -f should not override the check. v3 keeps it and adds this thread as a second Discussion line. > And a > restored backup normally has tablespace_map too, while the check only > looks at backup_label; is ignoring it on purpose? Yes. The server reads tablespace_map only when backup_label is there. Without backup_label it renames the file to tablespace_map.old and starts as usual. So tablespace_map alone does not stop the server from starting, and there is nothing for pg_resetwal to guard against. v3 also leaves out the --cluster-state patches, as David suggested. 0001 and 0002 have no code changes. Thanks, Shihao
v3-0002-Test-pg_resetwal-backup_label-check.patch
Description: Binary data
v3-0001-pg_resetwal-Refuse-to-run-when-backup_label-exist.patch
Description: Binary data
