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 1jtw3U-0004by-8H for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 16:39:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtw3T-0006co-5U for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 16:39:19 +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 1jtw3S-0006Xt-Rs for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2020 16:39:18 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jtw3Q-0001I1-J7 for pgsql-hackers@postgresql.org; Fri, 10 Jul 2020 16:39:17 +0000 Received: by mail-wm1-x32e.google.com with SMTP id j18so6816047wmi.3 for ; Fri, 10 Jul 2020 09:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VkW2+mcOFey/OyZahCUu6rRFgVBSjDmVogyPN2S8E3c=; b=JLD6J+7CanrZxpY/RwsHlA6XyCc8tFtDVyOAFjUvqeoP+KioaQocORLNanINYoOnbI +28fUCmMWIjS8R4G8DW3cUE41R5U6cgxmxOS6d+wTLAO9MeN0c+1HW5kxYnjlfPm/SPx Fur9pHMqsjyKGTrg6xch3cLQ+E43uHzICNG7pAlBcah4SnqNvb1A01gjDOALnLycSepb pweU7DFEkCVpdR+MWw78HGYF/g/RDjYF5k9QxKBuMesvW+qlXlgvpneAnSrzS++OmrEw +RAZxiaANsoZjG01PbkKGd9zUqH5lXOw8zgAFSkKGoWFZsNhetwEGOHQ5UCE+x2WpfxD HcfQ== 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:references :mime-version:content-disposition:in-reply-to; bh=VkW2+mcOFey/OyZahCUu6rRFgVBSjDmVogyPN2S8E3c=; b=I5LuLIDgpEOwJr/UYwQpZy/h/vKP9NY6b5X+q1JCX41fm7ZHwLcIpCrNr6AP1aqG8F YsLXl1NxlxarFBP35URvSqucBRnq/JP92J35YrAPl3h0Q1TPhQOth/g3q5vi4b9l0H+6 sFw9CdsRyb6atDGDgL+8AM53kYu1a27JDMaQg/dxrad2BPxW8ruGg5JZ8JyIIRPYwH2B hPlVvj1guen5/lIskiNyscSncDkiodGCjPPs0IitnRoTROeB05QnZQ8mbEcPVyeDRlzm BEu8+cZkT/5JJ/kO/UKmQQXS3mu9wVzLvnlzIiltumIi36kqn2VumDvTvnRJZ1a7kFE1 wkUg== X-Gm-Message-State: AOAM532M3wE84FV7FRloijr4yzFP8besRA7GFTzT4mgXhZNvFPhrtNlc iyqDrPlXAGlezKPjzEIbiB8= X-Google-Smtp-Source: ABdhPJw4oHMkE/fb2QMJbOLQbBPqKJX+bWfUZ080ZJypqrNvJSxjrW2sR5xRR2CQP6FzBQVtt8ogfg== X-Received: by 2002:a7b:ca4c:: with SMTP id m12mr6041861wml.33.1594399153193; Fri, 10 Jul 2020 09:39:13 -0700 (PDT) Received: from nol (82-64-124-11.subs.proxad.net. [82.64.124.11]) by smtp.gmail.com with ESMTPSA id d13sm10671743wrn.61.2020.07.10.09.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 09:39:12 -0700 (PDT) Date: Fri, 10 Jul 2020 18:39:09 +0200 From: Julien Rouhaud To: Justin Pryzby Cc: Michael Paquier , Daniel Gustafsson , pgsql-hackers@postgresql.org Subject: Re: expose parallel leader in CSV and log_line_prefix Message-ID: <20200710163909.sj2cbbovupzlesou@nol> References: <20200315111831.GA21492@telsasoft.com> <20200315114933.udjdx5wcgwkjnw45@nol> <20200318212511.GN26184@telsasoft.com> <8EC64544-2EAA-48B1-8B69-85158CA3EAE9@yesql.se> <20200710020940.GJ11153@paquier.xyz> <20200710022023.GE26220@telsasoft.com> <20200710151326.fics6czbbvloplsk@nol> <20200710161115.GK26220@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710161115.GK26220@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jul 10, 2020 at 11:11:15AM -0500, Justin Pryzby wrote: > On Fri, Jul 10, 2020 at 05:13:26PM +0200, Julien Rouhaud wrote: > > There's a thinko in the padding handling. It should be dones whether MyProc > > and/or lockGroupLeader is NULL or not, and only if padding was asked, like it's > > done for case 'd' for instance. > > > > Also, the '%k' escape sounds a bit random. Is there any reason why we don't > > use any uppercase character for log_line_prefix? %P could be a better > > alternative, otherwise maybe %g, as GroupLeader/Gather? > > Thanks for looking. %P is a good idea - it's consistent with ps and pkill and > probably other %commands. I also amended the docs. Thanks! So for the leader == NULL case, the AppendStringInfoSpace is a no-op if no padding was asked, so it's probably not worth adding extra code to make it any more obvious. It all looks good to me, I'm marking the patch a ready for committer!