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 1jwSOq-0000Mf-UR for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 15:35:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwSOp-0001ZE-Rn for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 15:35:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwSOp-0001Wt-HR for pgsql-hackers@lists.postgresql.org; Fri, 17 Jul 2020 15:35:47 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jwSOm-0007nz-JT for pgsql-hackers@postgresql.org; Fri, 17 Jul 2020 15:35:46 +0000 Received: by mail-qk1-x742.google.com with SMTP id q198so9122241qka.2 for ; Fri, 17 Jul 2020 08:35:44 -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=fDQv8PFeOqcxYr5M1GK8En3U2PdnGX4S4sT9hiHjbAQ=; b=TEY4PWVnsacqZH2XvVIrDjEN/Etl5fizBADVcRgACmr7FCEflhmPF4Z/3bsjWRaHEe RrErqZ+CL9pwsjniuFFVv8Wyj/U5i14+d4pABKaXe1HotDNf2uBIU5S+LS1SJ/tBRbBE OwZ6U/uw6JOBwKIZJ1RjCoZIUdGToTIenusj/AiuJd1EBXLPIp4ZNIs53VJ5Vij9wTT8 RUm86xp0FkC7AbzC6nSYZiycSZB7QSiytacgwu/YyqfLeESvEIXGJ9+qHl2aGUzC2Utp qV/2Qx4ziH1E5euiZqTqZpFl1hfwi215QUFFt2mQMQ1wakaXBhjPro/oGkteEYbeqTy+ rFrw== 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=fDQv8PFeOqcxYr5M1GK8En3U2PdnGX4S4sT9hiHjbAQ=; b=F0FPy9IRwE/l/p0W+N5XmnChPOhf92IBftWDd6D1M2QExQ+OPzf/w2viHRkQ/L/4Lg hEG0Y2HfPRFM5xvngETTUi+19rdzDBcxFX5schk70L9wuBmS/uj/5R5ivCC9eRa1Gbx/ R3p0Q9uLJQpqW25lH9u1yLrD6oR/JfCBCjuZdrnMGvgZQcKD4geyLokUc/r8JkYWtbcN CyPYvjGv1//0XVYS1hSJJ5NK1qKzhp4KgIrS51fsfRbslG/C8OotXhaG9TVu0krlb1N1 5I6X1sB1MpFC4bsU6Zo92uIxFNT811qGZiKFPhD3rFkv0tNOAiAxvJfkK8lPd8NO/MLS LIfw== X-Gm-Message-State: AOAM5315ZeYE/f/qeUnMIsGoeDR+KxjV7hiSpABMu7lWnivxee8jzUyR +/s36qslKpnCaGYj7gTLS9/kzQ== X-Google-Smtp-Source: ABdhPJzHRujlUlE9TxVe8BrmzNMZxILJYBUgW2a+6MvOEX+TALtghHDR/4nfYc/ku4PKZm31ZBEMew== X-Received: by 2002:a05:620a:905:: with SMTP id v5mr9914245qkv.268.1595000142744; Fri, 17 Jul 2020 08:35:42 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id 125sm10805189qkg.88.2020.07.17.08.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 08:35:42 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 844FC2A39F4; Fri, 17 Jul 2020 11:35:40 -0400 (-04) Date: Fri, 17 Jul 2020 11:35:40 -0400 From: Alvaro Herrera To: Julien Rouhaud Cc: Michael Paquier , Justin Pryzby , pgsql-hackers Subject: Re: expose parallel leader in CSV and log_line_prefix Message-ID: <20200717153540.GA17100@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Fri, Jul 17, 2020 at 7:01 AM Michael Paquier wrote: > > > Hmm. Knowing if a leader is actually running parallel query or not > > requires a lookup at lockGroupMembers, that itself requires a LWLock. > > I think that it would be better to not require that. So what if > > instead we logged %P only if Myproc has lockGroupLeader set and it > > does *not* match MyProcPid? That's what I said first, so +1 for that approach. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services