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 1jtwdj-0005o0-S3 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 17:16:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtwdi-0006cP-Rv for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 17:16:46 +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 1jtwdi-0006cF-LE for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2020 17:16:46 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jtwdf-0001aa-QS for pgsql-hackers@postgresql.org; Fri, 10 Jul 2020 17:16:45 +0000 Received: by mail-qt1-x841.google.com with SMTP id o38so5010093qtf.6 for ; Fri, 10 Jul 2020 10:16:43 -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=M93dxmu+CX5kV88rxTtWGwQ3NAFqhKrjsXEg3fb5dH4=; b=CaOizAWHfTbBq7DLZki9nGPuvhw3S703hF+w+2JuC3aj38q8Is6BBti8u5f1wJwESn HPTcTaxPiiKM6TeDhYHSWrQO/FEGMHsQln4mw+me7F1GcdxnEmJxhig5lKQYcpS47nLQ tV/mrtHvinFg1S7p//y4SKhqtxVPHknd70NYB2utlIXHz8SPY9pN4+rcCCIlfvVXClcg E9emq70NlkQr/tqzUsmrIWighpY+bjNw72Hc6RzgFQNGJyhOE5mso44nY6ETO1IGYle2 I5sniv91Awf47qd8qOfcf+Ahv/MBvqnwatRLk9PAUdfiikvtYoV/VjctpIJ7+mcQqeCG XL4A== 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=M93dxmu+CX5kV88rxTtWGwQ3NAFqhKrjsXEg3fb5dH4=; b=syg+VTWCbIVhJEhb5jQRXRfIaN5921gSqolFNTyHJufLzrwLNu20VCUEo3gAXFru+k iVf4CYc2OhaaFynEpaWYVKiFXwxEXxKbH8DeTtSxO/JY53JpCEuQdEh5HoR/k3oa8lvX PReF23Od2fB0MjBqAA3s1JYzdEEElwb5XQLrGgArmTsI2+dUkGWrGe6gEtu5L7714Yq4 oBrCMgOV/t+Ska236yON9zkD11OWHdXPZbH1YHaiYiKr3i1s2QBrR1bp6XUJypP3lxNv +4NREOM+ka3Vw1KvkQy75+al03kcMPgcoO1+0PGURMfqlNDcnxT1aEozumztYSRLmJfF wPqw== X-Gm-Message-State: AOAM532iue6NaS1KdYmuYD6ZDVwRRceFDk0BISq7MsI7ASE5RqJzn2rw cGYfAT3PRCf5DsfkMLocOIhqag== X-Google-Smtp-Source: ABdhPJyG91OQDkO5L5UW+B8nwlVmsfASXfIC1ao4NrNoJB8AtkAkwgq4K89rn8yzt1mN4Ry0DeFCDg== X-Received: by 2002:ac8:d86:: with SMTP id s6mr43596474qti.343.1594401402879; Fri, 10 Jul 2020 10:16:42 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id a185sm7870585qkg.3.2020.07.10.10.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 10:16:42 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CE69D2A38D3; Fri, 10 Jul 2020 13:16:40 -0400 (-04) Date: Fri, 10 Jul 2020 13:16:40 -0400 From: Alvaro Herrera To: Justin Pryzby Cc: Julien Rouhaud , pgsql-hackers@postgresql.org Subject: Re: expose parallel leader in CSV and log_line_prefix Message-ID: <20200710171640.GA26222@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200710165524.GL26220@telsasoft.com> 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-10, Justin Pryzby wrote: > On Fri, Jul 10, 2020 at 12:45:29PM -0400, Alvaro Herrera wrote: > > I think it's overly verbose; all non-parallel backends are going to get > > their own PID twice, and I'm not sure this is going to be great to > > parse. I think it would be more sensible that if the process does not > > have a parent (leader), %P expands to empty. > > That's what's done. > > + Process ID of the parallel group leader if this process was > + at some point involved in parallel query, otherwise null. For a > + parallel group leader itself, this field is set to its own process > + ID. Oh, okay by me then. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services