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 1qpr0Z-007IFB-V7 for pgsql-admin@arkaria.postgresql.org; Mon, 09 Oct 2023 14:13:20 +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 1qpr0X-00EIBt-O5 for pgsql-admin@arkaria.postgresql.org; Mon, 09 Oct 2023 14:13:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qpr0X-00EIB6-CE for pgsql-admin@lists.postgresql.org; Mon, 09 Oct 2023 14:13:18 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qpr0V-0016Bz-Cz for pgsql-admin@lists.postgresql.org; Mon, 09 Oct 2023 14:13:17 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-5a7ac4c3666so3121947b3.3 for ; Mon, 09 Oct 2023 07:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696860793; x=1697465593; darn=lists.postgresql.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=IU3nq+OSo/X+GFCX5LcLzw4NrhJyxBJ6VcfcW9UypSM=; b=D6exwSEz7FZafZhYhdirDoLwZTYbQUNmYef+yDubhfHWl6kxy+I1guY0bTbMIkV27C Ra4UQDAwHcM9qNDl6qszeKDx0LVcn88/PotJnQfu6ZYQ1a90i6OBMT7BdEhoa3ciPHOR KZasee8EpLmx1TYuI7XOwOwGBxYr2ZUZupT1tUvSJocCg361Zo3kL8r7P0r6dWKIfG/3 3pMdEwj7sGjv7lKIpLhjHWuCERsRURZMf7RzcMABTs8zn/EJixx49e3W2E07Kec+SLp4 YOwtb8kJ9Ip/EOYDJMl32A89mAJ3NI74U5g8elYDLtFqHjPB3oMr8hbj3v6TjZg3Z/ma zizQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696860793; x=1697465593; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=IU3nq+OSo/X+GFCX5LcLzw4NrhJyxBJ6VcfcW9UypSM=; b=hivH0s8tMCvkw3Jx++aojzJjg6Ninj7PEO4k0q+lEJj7d/IiwSSTQ1J0O9SSU/KTCP Nvid3GqIyKQ6/FAGSKqXR09KVwnWa4hhMwtcCELNJb3a1FMV948HGlC5UZU+XQN+B6i9 RBFfbIFNSa41xbDzUgny/rF0kVI+FyjHQalyvvkduGbHzYPhunG8h7jqf7R2tehpedxP XwypuUoF/zrvye/y05KJ4+eQlpThtEb+VFWztSePEKat+ZA9BL8FOdnCZOcvOSYffcjm 9qd2nqCuwohx8hDR0i3L/lJf+DZ+xirzD2VIPja3DP/8obDowByNE2p4qKLTEW+f3a2g gzAw== X-Gm-Message-State: AOJu0Yy4UeJ34bzcIaJonvwZaOp4B4LNPt36mg5F02EmtbjuaYaVzlx2 I/n3ecjsGABmYU+qgafzjlQMlEeAsmY= X-Google-Smtp-Source: AGHT+IGs6uSD6trTvMoOVqmo0EhWrQGPbR4ZcDo6guhEWuWyraYja+Lsr+/9+6EmpLtH1o713U+SWQ== X-Received: by 2002:a81:4989:0:b0:59f:61b7:fb71 with SMTP id w131-20020a814989000000b0059f61b7fb71mr15968349ywa.13.1696860793374; Mon, 09 Oct 2023 07:13:13 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:c116:92a9:442a:ffc3? ([2600:1700:bd2c:b810:c116:92a9:442a:ffc3]) by smtp.googlemail.com with ESMTPSA id d139-20020a0ddb91000000b005a2202905casm3722765ywe.43.2023.10.09.07.13.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 07:13:13 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------0VJHNKmQ106UWmSqP9230Ipm" Message-ID: Date: Mon, 9 Oct 2023 09:13:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Discard All in pgbouncer Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------0VJHNKmQ106UWmSqP9230Ipm Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/9/23 09:07, Rajesh Kumar wrote: > Hi, > > I could see queries like DISCARD ALL is idle for more than 5minutes (we > are using pgbouncer). > > Why is it idle for more than 5mns? I read about pgbouncer and could not > understand this thing. If resetting a connection using query becomes one > idle connection, I don't understand the pooling system here In your case, "Idle" just means that DISCARD ALL was the last statement that the pid executed.  Now, it's just doing /nothing/, because there's nothing to do.  IOW, this is just fine.  No need to worry. -- Born in Arizona, moved to Babylonia. --------------0VJHNKmQ106UWmSqP9230Ipm Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10/9/23 09:07, Rajesh Kumar wrote:
Hi,

I could see queries like DISCARD ALL is idle for more than 5minutes (we are using pgbouncer).

Why is it idle for more than 5mns? I read about pgbouncer and could not understand this thing. If resetting a connection using query becomes one idle connection, I don't understand the pooling system here

In your case, "Idle" just means that DISCARD ALL was the last statement that the pid executed.  Now, it's just doing nothing, because there's nothing to do.  IOW, this is just fine.  No need to worry.

--
Born in Arizona, moved to Babylonia.
--------------0VJHNKmQ106UWmSqP9230Ipm--