public inbox for [email protected]
help / color / mirror / Atom feedTimeout gets unset on a syntax error.
2+ messages / 2 participants
[nested] [flat]
* Timeout gets unset on a syntax error.
@ 2024-05-29 10:29 ISHAN CHHANGANI . <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: ISHAN CHHANGANI . @ 2024-05-29 10:29 UTC (permalink / raw)
To: [email protected] <[email protected]>
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Timeout gets unset on a syntax error.
@ 2024-05-29 13:19 Greg Sabino Mullane <[email protected]>
parent: ISHAN CHHANGANI . <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Greg Sabino Mullane @ 2024-05-29 13:19 UTC (permalink / raw)
To: ISHAN CHHANGANI . <[email protected]>; +Cc: [email protected] <[email protected]>
On Wed, May 29, 2024 at 6:29 AM ISHAN CHHANGANI . <
[email protected]> wrote:
> Is there some code within Postgres that resets/removes the signals in case
> a query hits any error?
>
See the comment and call to disable_all_timeouts() in postgres.c, part of
the cleanup-after-exception efforts:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/tcop/postgres.c#l4356
Cheers,
Greg
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-05-29 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29 10:29 Timeout gets unset on a syntax error. ISHAN CHHANGANI . <[email protected]>
2024-05-29 13:19 ` Greg Sabino Mullane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox