Timeout gets unset on a syntax error.

From: "ISHAN CHHANGANI (dot)" <f20200230(at)hyderabad(dot)bits-pilani(dot)ac(dot)in>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Timeout gets unset on a syntax error.
Date: 2024-05-29 10:45:09
Message-ID: SL2P216MB1380E68F1A938657AD095C21F5F22@SL2P216MB1380.KORP216.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On a particular query, I start an alarm (say for 5 sec) using RegisterTimeout , and when the alarm rings, I log something.
This works fine.
But if I run a query with a syntax error between the time duration, then the alarm never rings.
Is there some code within Postgres that resets/removes the signals in case a query hits any error?
TimeoutId timer = RegisterTimeout(USER_TIMEOUT,interval_handler);
enable_timeout_after(timer, 5 * 1000);

Thanks,
Ishan.

--
The information contained in this electronic communication is intended
solely for the individual(s) or entity to which it is addressed. It may
contain proprietary, confidential and/or legally privileged information.
Any review, retransmission, dissemination, printing, copying or other use
of, or taking any action in reliance on the contents of this information by
person(s) or entities other than the intended recipient is strictly
prohibited and may be unlawful. If you have received this communication in
error, please notify us by responding to this email or telephone and
immediately and permanently delete all copies of this message and any
attachments from your system(s). The contents of this message do not
necessarily represent the views or policies of BITS Pilani.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2024-05-29 11:00:00 001_rep_changes.pl fails due to publisher stuck on shutdown
Previous Message vignesh C 2024-05-29 09:55:52 Re: Ambiguous description on new columns