pg_resetwal: Use separate flags for whether an option is given
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 8 Dec 2025 14:54:54 +0000 (16:54 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 8 Dec 2025 14:54:54 +0000 (16:54 +0200)
commit978cf02bb8caeafd6fe5178e67016ffd898599b4
treea83f866c803fdbb24986edaa82f4fa741b6bb71c
parent636c1914b483bab0eaabdec30cf1f2c743606d7f
pg_resetwal: Use separate flags for whether an option is given

Currently, we use special values that are otherwise invalid for each
option to indicate "option was not given". Replace that with separate
boolean variables for each option. It seems more clear to be explicit.

We were already doing that for the -m option, because there were no
invalid values for nextMulti that we could use (since commit
94939c5f3a).

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/81adf5f3-36ad-4bcd-9ba5-1b95c7b7a807@iki.fi
src/bin/pg_resetwal/pg_resetwal.c