Re: Add --system-identifier / -s option to pg_resetwal

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: Add --system-identifier / -s option to pg_resetwal
Дата
Msg-id CAM527d_xUH0Jug0Kf29Mt+tL89DoqANc6ZOit+BCy+x6GOwPgw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add --system-identifier / -s option to pg_resetwal  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Add --system-identifier / -s option to pg_resetwal
Список pgsql-hackers
Thank you for the review!

Attached is v3 addressing your feedback:

- Changed label to "Database system identifier" for consistency
- Use PRIu64 instead of UINT64_FORMAT for gettext
- Moved option entry after "char-signedness" in getopt array
- Fixed test to use pg_controldata instead of pg_control_system()

On Wed, Jun 4, 2025 at 4:56 PM Fujii Masao <
masao.fujii@oss.nttdata.com> wrote:
One question about this feature: why do we need to allow
explicitly setting the system identifier? If the goal is
simply to ensure it's different from the original,
wouldn't it be sufficient to let pg_resetwal generate
a new (hopefully unique) value using existing logic,
like what's done in GuessControlValues() or BootStrapXLOG()?

Auto-generation would cover most cases. But explicit setting is a superset -- users who want random can generate one themselves. Explicit control costs nothing extra and gives full flexibility for edge cases (eg, reproducible test environments, coordinating multiple clones). pg_resetwal users are expected to be experts, so giving more control can cover more possible scenarios.


Nik



Вложения

В списке pgsql-hackers по дате отправления: