Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCQEh-0003rI-3Y for pgsql-general@arkaria.postgresql.org; Tue, 16 Oct 2018 14:22:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCQEf-0001jr-EA for pgsql-general@arkaria.postgresql.org; Tue, 16 Oct 2018 14:22:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCQEe-0001jV-UZ for pgsql-general@lists.postgresql.org; Tue, 16 Oct 2018 14:22:13 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gCQEb-0004TH-Dl for pgsql-general@lists.postgresql.org; Tue, 16 Oct 2018 14:22:11 +0000 Received: by mail-qt1-x830.google.com with SMTP id q41-v6so25835697qtq.10 for ; Tue, 16 Oct 2018 07:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9A/DWZDikbzyzfRNFXW4dVNTJKBwaPCKHuoVGVCjU94=; b=JPEoDimRVYrcWGfQJ2xqXZBSmW0LHCv9/omgHwvtXQrpEMYr9OoHHTGRFPPqmjb3n2 ULEyp3w+Z+R/GCr4bqKmVCuDKz0bMXrc+Ff2vV0Td+KLDb5oYNvkOYO2InGBKIqwGDmv pF7Zfpy4nLZ6b8L2QqwOTrAs4u68VRugU1xSVcsaxSA2a03E50F0IU3Pz8W4xBngBzlB nGMOYScnvIouF52Cc/MPZaAmCD27z9+M6I2IHWqN9qkrhZJni9PMTPve32tZ2lWIfhr1 UE6oCi/PaL3DYZtoFxoZXQGG0oBPPZMkp0a2At0LbjVGfBmnxyqwaWww+wlN1lJVo87w TJkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9A/DWZDikbzyzfRNFXW4dVNTJKBwaPCKHuoVGVCjU94=; b=QciyZL9EXpNnoxJ1Tl9MOfalM3zino78T8r2a1XYP1yCs+WDRifDSN3e6KQqHKX6d2 birykoMbWslWcppGY2KmFY42BrgqQd0CmUgEmD+De9FB7MTNukHz/jgVnb89faGD/PrJ SY4JkitJNdRF4KSjkh+FehQADKEtgMNBBFabSTLYH5moCcRNKYBedGkbCc0iNQbk5srp /4ECsEZdfhnwQVoxvsRIewbovtcmt5lYA/5/SGe+qoI16PZTnLhjLlU8znS06Bt6Kxog Q3fHY5ZO6dfPDkQHPtxV2ZQ485QLAnqk/QlOzPkLBE4uatrRQoc30qywgDNNZOigEll+ mk1A== X-Gm-Message-State: ABuFfogobboijdAziJNqfxQCDHgOe6fwbN/OtsjukONZlajH2xxDFiKk KajKJIxvClRQNzoSkVYXdaXscQ== X-Google-Smtp-Source: ACcGV619BHDLaGfDIM4QRVJSINcr3rR1j2gLy9Mk+q4S83rvx7+U0Dw0geTURcjMUUE5bBZ8zWj2rg== X-Received: by 2002:a0c:c506:: with SMTP id x6-v6mr20614921qvi.154.1539699728273; Tue, 16 Oct 2018 07:22:08 -0700 (PDT) Received: from alderaan.marques ([181.95.22.137]) by smtp.googlemail.com with ESMTPSA id e24-v6sm9334856qtc.78.2018.10.16.07.22.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 07:22:07 -0700 (PDT) Subject: Re: Pgbouncer discard all To: Scot Kreienkamp , Nicola Contu , "pgsql-general@lists.postgresql.org" Cc: Alessandro Aste References: <17082AAFC33A934082836458CB53494374D3C416@MONDB03.na.lzb.hq> From: =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= Openpgp: preference=signencrypt Message-ID: Date: Tue, 16 Oct 2018 11:22:04 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <17082AAFC33A934082836458CB53494374D3C416@MONDB03.na.lzb.hq> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El 16/10/18 a las 09:59, Scot Kreienkamp escribió: > Are you sure they’re actually waiting?  Don’t forget 10.5 will show the > last query executed even if the connection is idle.  I believe discard > all would be the last command the pgbouncer would send to the database > when the client is done as it resets the connection for the next > client.  So what you’re describing would seem to be expected behavior.  He might have been referring to client waiting. That is visible in the pgbouncer pseudo-database OTOH if the the waiting is seen in pg_stat_activity, then pgbouncer has nothing to do. The connection has already been assigned to the client and the waiting is happening on the database server, not the pooler. Regards, -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services