RE: Reject negative max_retention_duration values
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Chao Li' <li.evan.chao@gmail.com>, PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Date: 2026-06-09T14:44:56Z
Lists: pgsql-hackers
Dear Chao, +1 the idea to reject the negative value. ``` @@ -4796,7 +4796,7 @@ should_stop_conflict_info_retention(RetainDeadTuplesData *rdt_data) Assert(rdt_data->phase == RDT_WAIT_FOR_PUBLISHER_STATUS || rdt_data->phase == RDT_WAIT_FOR_LOCAL_FLUSH); - if (!MySubscription->maxretention) + if (MySubscription->maxretention <= 0) return false; ``` IIUC, the negative value can be rejected at CREATE/ALTER SUBSCRIPTION phase, right? Why do we have to update even here? For the clarification purpose? Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
-
Disallow negative values for max_retention_duration.
- 987440b33a51 19 (unreleased) landed