pgsql: pg_resetwal: Fix handling of commit timestamp XIDs

Поиск
Список
Период
Сортировка
Искать

pgsql: pg_resetwal: Fix handling of commit timestamp XIDs

От:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Дата:
pg_resetwal: Fix handling of commit timestamp XIDs

The help text for -c option documents that zero for either transaction
ID means to leave the corresponding value unchanged.  Commit
978cf02bb8c replaced the separate checks for the two values with a
single flag indicating that the option was specified, causing zero to
be written to the control file instead.

Also parse the second transaction ID with strtouint32_strict(), like
the first one.  Using strtoul() there was an oversight in commit
636c1914b48, which intended to reject negative and out-of-range
arguments.

Author: Chao Li 
Discussion: https://www.postgresql.org/message-id/F61E486B-746B-42F3-A532-B8D4F1519583@gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f7013fe089d0e0db5b5e4a20d84acecf0f128a1

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

FAQ