BUG #16780: Inconsistent recovery_target_xid handling across platforms
От | PG Bug reporting form |
---|---|
Тема | BUG #16780: Inconsistent recovery_target_xid handling across platforms |
Дата | |
Msg-id | 16780-107fd0c0385b1035@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #16780: Inconsistent recovery_target_xid handling across platforms
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 16780 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 13.1 Operating system: Windows Description: While testing src/test/recovery with a non-zero epoch the inconsistency was discovered. The 003_recovery_targets.pl test with the slight modification passes on Linux x86_64, but fails on Windows x64. The modification is to append just after the $node_master->init: command([ 'pg_resetwal', '--epoch=1', $node_master->data_dir ]); And on Windows I get: t/003_recovery_targets.pl ............ 2/9 Bailout called. Further testing stopped: pg_ctl start failed FAILED--Further testing stopped: pg_ctl start failed regress_log_003_recovery_targets contains: # pg_ctl start failed; logfile: 2020-12-18 12:25:11.597 MSK [1312] LOG: invalid value for parameter "recovery_target_xid": "4294967782" 2020-12-18 12:25:11.597 MSK [1312] FATAL: configuration file ".../src/test/recovery/tmp_check/t_003_recovery_targets_standby_2_data/pgdata/postgresql.conf" contains errors So on Windows the recovery_target_xid parameter doesn't accept 64-bit value. As I see in check_recovery_target_xid() the strtoul() function is used to check/convert the input value, that is later stored into 32-bit variable. Thus, on platforms where unsigned long is 32-bit wide, you can't specify a result of pg_current_xact_id() as recovery_target_xid, while on platforms where unsigned long is 64-bit, you can, but high 32 bits are just ignored.
В списке pgsql-bugs по дате отправления: