Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwGXV-0000PE-A7 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 02:55:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwGXT-0000QD-W4 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 02:55:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwGXT-0000Q6-KO for pgsql-hackers@lists.postgresql.org; Fri, 17 Jul 2020 02:55:55 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jwGXN-0005st-1r for pgsql-hackers@postgresql.org; Fri, 17 Jul 2020 02:55:54 +0000 Received: by mail-qt1-x844.google.com with SMTP id u12so6579993qth.12 for ; Thu, 16 Jul 2020 19:55:48 -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=Q7LhqTiRY/zJj//4j2K8SPFo75ktswYslqwyLznparE=; b=QfJf9JWJPuc62aSj2FtZ/5kmKduIlf87totklYZ/ktb0DE7jW/7qCrFVr/zpKUll7M KGTfM9ZMaokTHFAriEQhaci6kCqWfa52k/Odi5ZX9Z4mSAz60Dy2FTmDOFFDxEx5lpLO fx3VRPpbIMrYRL9YWsNEJqBzDpIZrrdxqeGBPhr0owayGjzmi/OiYJgJlZL+V+6cBXJa ADKYhyadbjaNQQqm+nXJoe2x72c0zLteHiLsSgT1jCtLmsVTa5bSQkkV07A2/M07NdLo YtxcGgqEbpb9kbyU8BZ1Ki57HykjMvkx3O3Eql5DNaxJvf5PCs0giMXFKDvndWwCOEYA g2jw== 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=Q7LhqTiRY/zJj//4j2K8SPFo75ktswYslqwyLznparE=; b=RxMcKMYSOso6ezQXMdP4Qs10GL4QhClpiaYVVessbkbOZRarURJsuFfxTO1tl6rRNj QpzM7XPEulGiiDGsAsi0L+flvnNv5pT9S8hlayJwxZBOSLswAzSZ4/lhk4O4MYq28M1Q uXCbNc5ZnZlU+nNjL/A2mabyS4mGFbDs7fwkywUN6KKKdKUBSGCnsqi6T6s7eQOqFZTU WbQzgSf33KmM1gJThe1mt2t+7wdmtuO4zuiFjA4d4X+id3cvDnHfhGVK8nn8YZCFyT5f 0MxFGfLx8bO8n2+QDj6VPZQVs/cARgznEmcy59+uV85HDBp1rVODL5EKQIXNmSArIP7z FPdA== X-Gm-Message-State: AOAM530TAzrYJ8jL4AeDo5uZ6yNG+tSsu/4vVy5aRU0bq1UmVvMGXo2x hKvNXFJmlzVV0NZWCIdaWUV2zA== X-Google-Smtp-Source: ABdhPJxhLcUtbJQLrku1pvr4oBJnGeapsJMBGlmu+aIOfJYm9hOMYSqugV1zybO5OopJK3VGYS2PtQ== X-Received: by 2002:ac8:3fcf:: with SMTP id v15mr8576650qtk.274.1594954548112; Thu, 16 Jul 2020 19:55:48 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id b186sm9046912qkd.28.2020.07.16.19.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 19:55:47 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F01BC2A3ACC; Thu, 16 Jul 2020 22:55:45 -0400 (-04) Date: Thu, 16 Jul 2020 22:55:45 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Justin Pryzby , Julien Rouhaud , pgsql-hackers@postgresql.org Subject: Re: expose parallel leader in CSV and log_line_prefix Message-ID: <20200717025545.GA30699@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200717024107.GC29811@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-17, Michael Paquier wrote: > Please note that this choice comes from BecomeLockGroupLeader(), where > a leader registers itself in lockGroupLeader, and remains set as such > as long as the process is alive so we would always get a value for a > process once it got involved in parallel query. This patch is just Oh, ugh, I don't like that part much. If you run connections through a connection pooler, it's going to be everywhere. Let's put it there only if the connection *is* running a parallel query, without being too stressed about the startup and teardown sequence. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services