Re: Tighten up range checks for pg_resetwal arguments
| От | Andrey Borodin |
|---|---|
| Тема | Re: Tighten up range checks for pg_resetwal arguments |
| Дата | |
| Msg-id | 5ED2401E-C0FB-457D-942C-6FAFF1159740@yandex-team.ru обсуждение исходный текст |
| Ответ на | Tighten up range checks for pg_resetwal arguments (Heikki Linnakangas <hlinnaka@iki.fi>) |
| Список | pgsql-hackers |
> On 4 Dec 2025, at 00:07, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> I got a little annoyed by how lax pg_resetwal is about out-of-range values.
A little bit offtopic, but anyway.
It's kind of common practice for many tools.
We actually had a corruption after pg_upgrade inflicted by the bug in upgrade script.
Here's the bugfix:
exe(
'/usr/bin/timeout 300 '
- 'sudo -u postgres /usr/lib/postgresql/{version_to}/bin/vacuumdb --port {port}'
+ 'sudo -u postgres /usr/lib/postgresql/{version_to}/bin/vacuumdb --port {port} '
'--analyze-in-stages --all -j 8',
context={'port': 7432},
allow_fail=True,
)
Absence of space was ignored by vacuumdb. Executed command:
vacuumdb --port 7432--analyze-in-stages
was expected to analyze only, but made a vacuum. That was not rsynced later.
So +1 from me on the strict parsing of arguments by sharp tools like pg_resetwal.
Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: