WAIT for LSN does not reject small negative timeouts

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: WAIT for LSN does not reject small negative timeouts
Date: 2026-09-25 05:53:17
Message-ID: CALdSSPiQaKvF_FhLdZKmMu=a-eoeXgJg49Fb1aVmYqj6ksAFng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

repro:

reshke=# wait for lsn '1/01C96E58' with (timeout '-1ms');
ERROR: timeout cannot be negative
reshke=# wait for lsn '1/01C96E58' with (timeout '-0.4ms');
^CCancel request sent
ERROR: canceling statement due to user request

I think we need to reject '-0.4ms' in the same way as '-1ms'.

SImple fix attached

--
Best regards,
Kirill Reshke

Attachment Content-Type Size
fix-bug13-0001-wait-fix-negative-subms-timeout.patch application/octet-stream 2.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-09-25 05:54:41 Re: Persist slot invalidations before publishing them
Previous Message Hayato Kuroda (Fujitsu) 2026-09-25 05:52:21 RE: Allow pg_read_all_stats to read replication origin status