RE: Two issues with version checks in CREATE SUBSCRIPTION
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Fujii Masao' <masao.fujii@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-23T05:55:41Z
Lists: pgsql-hackers
Dear Fujii-san, Thanks for the patch! They basically look good to me. > First, in subscriptioncmds.c this check rejects enabling retain_dead_tuples > when the publisher is running an older version. However, the comparison uses > 19000 as v19 value. Since server versions are encoded as 190000 for v19, > this appears to be a typo and allows the option to be enabled unexpectedly > on pre-v19 publishers. The attached 0001 patch fixes this by correcting > the version constant. One idea is to introduce a constant like RETAIN_DEAD_TUPLES_MIN_VERSION_NUM, which avoids similar typo. Is it overengineering? Best regards, Hayato Kuroda FUJITSU LIMITED