Re: Reject negative max_retention_duration values

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: Re: Reject negative max_retention_duration values
Date: 2026-06-09 14:24:36
Message-ID: CAA4eK1Jop+GW0JHRfyg+enDYLQJP1JX9c3eu1yP7RdFN=e3=NA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 9, 2026 at 1:35 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
```
>
> It only checks !MySubscription->maxretention, so a negative value will pass. Then, in TimestampDifferenceExceeds, the negative value is counted, causing the actual wait time to be shorter than the intended value.
>

Thanks for the report and analysis. On first read, it sounds correct
to me, I'll spend some more time and share my feedback.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marcos Pegoraro 2026-06-09 14:33:04 Re: Get rid of "Section.N.N.N" on DOCs
Previous Message Amit Langote 2026-06-09 13:31:01 Re: PG19 FK fast path: OOB write and missed FK checks during batched