Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkxwb-0002FS-OZ for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jul 2019 21:46:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hkxwa-0006D4-KK for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jul 2019 21:46:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkxwa-0006An-CB for pgsql-bugs@lists.postgresql.org; Tue, 09 Jul 2019 21:46:36 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkxwX-0003ha-By for pgsql-bugs@lists.postgresql.org; Tue, 09 Jul 2019 21:46:35 +0000 Received: by mail-qt1-x841.google.com with SMTP id j19so189855qtr.12 for ; Tue, 09 Jul 2019 14:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=z1aU9tRlZjWdkXzEd1L6nctwg0GOqsADloq1+tWZv98=; b=FBIPpD7xmLH7+Sdc+5bR3qndS6ZTscvlbCAFwqo9B7dcQwKJz2t9yFknukRlMkF7Po 5M/uhFPAKOWoz0vCGhI/PG2agMLynVL3rA2a3WrgjpK4my1Utj8qTRsFiQJ3e9F+CMI8 yS291f6Qr9HUrNTtRkz9W64bUtyroutf84gfLqB7YhVMouXddV+USWA/9UmpY54POz0K wd18sQzfP/n1J15409pIj1/aavM4r3Qhzmfp6kTNQmseGPkCktpBA3Nm41xFlsvSQ9AQ CO4YKSO3xtDPB+0K5JX/tM3CRySp9cp7B6KZidR2+U8dmgG955L190Wvv7FlUO8rrtlI r1XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=z1aU9tRlZjWdkXzEd1L6nctwg0GOqsADloq1+tWZv98=; b=t/2Vvkhpk7xfE9NBznFK+lN5l5cL4VUaYZV1/Wk5IgKZF+hjWUIdtAbdwl++VSSd9z vL5QCeGryVdlqoLI6d6439z92py4GrPFKW7Xp/mQvY0RqNkDsb/2IP1b0xlW21YP6pkO smUgV3+IXG86aFMwZH64a96MT5VKiuotBRbSI+pskyw8sk947C2ezCm3kH5h9KKEtRJo FjzZ+NZ66k/vhejF8st3PI2rWar1r4+wk+aa4KO7tClyF4tSsvHxtkmzj3AhoNri1uXD KYZO28DHR8RA1lAsim21ZplqVu4UP2XKIxycKlatSEl66LXH2Vf6bD5Eu8/PuX1imYhT uEJA== X-Gm-Message-State: APjAAAWsbLmJ7kE1R+L6YeUW9i8aMvXyc+Cs1EjOBX/foQcc5Da8k7Z8 vCr1sadOOsWeh63ZhS8fb9M4jQ== X-Google-Smtp-Source: APXvYqwKx90lHctxq5dUtZMQ90TGf9BS1LWl24d5r/QIuWcwIM9ZdXegKU5Wyi/WzreSRxAYBk/PnQ== X-Received: by 2002:ac8:431e:: with SMTP id z30mr20795448qtm.291.1562708792058; Tue, 09 Jul 2019 14:46:32 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id d23sm119813qkk.46.2019.07.09.14.46.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 14:46:31 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 23BAF120219; Tue, 9 Jul 2019 17:46:30 -0400 (-04) Date: Tue, 9 Jul 2019 17:46:30 -0400 From: Alvaro Herrera To: Andres Freund Cc: Michael Paquier , marko@joh.to, pgsql-bugs@lists.postgresql.org, Magnus Hagander Subject: Re: BUG #15888: Bogus "idle in transaction" state for logical decoding client after creating a slot Message-ID: <20190709214630.GA15632@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190709201557.y5yt57z2za2hu6l7@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-09, Andres Freund wrote: > The problem doesn't exist in later versions, because there > exec_replication_command() does an explicit > /* Report to pgstat that this process is now idle */ > pgstat_report_activity(STATE_IDLE, NULL); > That's due to > > commit d02974e32e028fc078d8f5eca1d6a4516efb0aa6 > Author: Magnus Hagander > Date: 2017-12-29 16:19:51 +0100 > > Properly set base backup backends to active in pg_stat_activity > > which is post 9.6. Not sure I really feel a huge appetite for whacking > this around in the back branches. Hmm ... so what that commit did is precisely to fix this bug. Magnus thought at the time he was fixing a pg10 bug, https://postgr.es/m/CABUevEwX4g8y=gmgfPzxFKS7gqjSYNR949Xc96OQm=YXJmh_Og@mail.gmail.com but apparently now we see that the bug was older than that. Maybe it's okay to backpatch further? (Booh to missing "Discussion:" tags in commit messages) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services