Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCGYs-004NKz-Bm for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2024 10:29:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sCGYs-00EdUT-2c for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2024 10:29:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCGYr-00EdUK-1v for pgsql-general@lists.postgresql.org; Wed, 29 May 2024 10:29:37 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sCGYh-002VQw-E8 for pgsql-general@lists.postgresql.org; Wed, 29 May 2024 10:29:35 +0000 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6f8edde24b3so1125526a34.2 for ; Wed, 29 May 2024 03:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hyderabad.bits-pilani.ac.in; s=google; t=1716978565; x=1717583365; darn=lists.postgresql.org; h=content-language:mime-version:accept-language:message-id:date :thread-index:thread-topic:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KUHe/dU7/opXfJm0vP8q/o7ZI/JB1hsnIdluB9FfFPs=; b=SpSqgApn8wTxl7Z/fiI8ham/9eRUa7dfTaU0oqJ9lbz3fKW31bq/C1zBMRciavj7I+ RhP1+fp2uVmgWLHx4u/ciDIUArMwzgKSKES0TZmbyVcl6mV3iZgwpUXeBbi5KAF/urx3 xRWn1r6+z91g3eI/O0FJ6vpVbMgZUU+d6umoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716978565; x=1717583365; h=content-language:mime-version:accept-language:message-id:date :thread-index:thread-topic:subject:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KUHe/dU7/opXfJm0vP8q/o7ZI/JB1hsnIdluB9FfFPs=; b=FBZTlG/RxXt4HSgFVBcardGdcNl3kkDyfD4LDlIUFezrlVBs2rm3ioM2dYm+clFuxh ub8YaQz/c6jFKwR7nKy5x9jHDY7UfxBNd/EN2RTOapfqvbA7MFf0DPPsZPoC30uzC9O/ GQeeas8dRY+lSmqBdf22D6tDxboO6rnWg+mVkXu/cWQzhZdzwdqpcjJGezxN4b0SQzfv NdaARXuuFW+f5EceFMwDvTZNwhLEvG4EWwXALf4+Cy8RuDbx2Y4Lb+redvchrOjGbVYd ny5lrFQy+60s6fs2vHzoTtN2F8BFpWbWqXV6xPCGWzOeacEG5PNgQyZUF23pufyf4875 cnSQ== X-Gm-Message-State: AOJu0YxCD08YGSYalgdKeCDqWfPjAqQlJ7eUfQDYILr0A5f+tAshHLP6 dRZcFBnIHO2H+C4/IJhkhO7o57ZQflaLfzcjeZQhVWB90d+An4r2M3emCDE6Czya6TI7iHle4g8 fUW5PCWQkyuYAxBlEV2qCLc+QLHO+31lksvf9kFVPfgN2TXu1fW3WherxZQp4j91BmK9mUDaJXV s7 X-Google-Smtp-Source: AGHT+IEzt+4GAo5mesx2V0EWy/ah5jryN4QCS86t4mE9ezFacVYbj6iY6CFp0iM0z/njpoXvTs960w== X-Received: by 2002:a9d:6e83:0:b0:6f0:36b4:71f1 with SMTP id 46e09a7af769-6f8d0a73df2mr14908841a34.13.1716978565554; Wed, 29 May 2024 03:29:25 -0700 (PDT) Received: from SL2P216MB1380.KORP216.PROD.OUTLOOK.COM ([2603:1046:101:a::5]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-682274bb965sm8937031a12.82.2024.05.29.03.29.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 03:29:25 -0700 (PDT) From: "ISHAN CHHANGANI ." To: "pgsql-general@lists.postgresql.org" Subject: Timeout gets unset on a syntax error. Thread-Topic: Timeout gets unset on a syntax error. Thread-Index: AQHasbJ0Jl7VSgDJ10qPZ8r4qHW+EQ== X-MS-Exchange-MessageSentRepresentingType: 1 Date: Wed, 29 May 2024 10:29:22 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-Exchange-Organization-SCL: -1 X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 MIME-Version: 1.0 Content-Language: en-IN Content-Type: multipart/alternative; boundary="_000_SL2P216MB1380EF37EA7D6193C83622C6F5F22SL2P216MB1380KORP_" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_SL2P216MB1380EF37EA7D6193C83622C6F5F22SL2P216MB1380KORP_ Content-Type: text/plain; charset="ISO-8859-1" 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. --_000_SL2P216MB1380EF37EA7D6193C83622C6F5F22SL2P216MB1380KORP_ Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable

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 syn= tax error between the time duration, then the alarm never rings.=

Is there some code within Postg= res that resets/removes the signals in case a query hits any error?

TimeoutId timer =3D= RegisterTimeout(USER_TIMEOUT, interval_handler= );

    enable_timeout_af= ter(timer, 5 * 1000);

 

Thanks,
Ishan.


The information contained in this electronic communication is intended sole= ly for the individual(s) or entity to which it is addressed. It may contain= proprietary, confidential and/or legally privileged information. Any revie= w, retransmission, dissemination, printing, copying or other use of, or tak= ing any action in reliance on the contents of this information by person(s)= or entities other than the intended recipient is strictly prohibited and m= ay be unlawful. If you have received this communication in error, please no= tify us by responding to this email or telephone and immediately and perman= ently delete all copies of this message and any attachments from your syste= m(s). The contents of this message do not necessarily represent the views o= r policies of BITS Pilani.
--_000_SL2P216MB1380EF37EA7D6193C83622C6F5F22SL2P216MB1380KORP_--