Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reuBW-00E9fL-3I for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Feb 2024 09:55:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1reuBS-001ooA-Jx for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Feb 2024 09:55:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reuBS-001oo2-97 for pgsql-hackers@lists.postgresql.org; Tue, 27 Feb 2024 09:55:34 +0000 Received: from mail1.dalibo.net ([51.159.93.128] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reuBO-001SZ7-OZ for pgsql-hackers@postgresql.org; Tue, 27 Feb 2024 09:55:33 +0000 Received: from [192.168.1.27] (unknown [90.58.191.166]) by mail.dalibo.com (Postfix) with ESMTPSA id 61D191FF93; Tue, 27 Feb 2024 10:55:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1709027728; bh=X0LxwjDXkyBWFBPJOnbq9nfPF62BuriI/QhNUXVNzPY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MB/wHiqs+eNDGhsKXk16L/KSk1h8l6f8sP6rhpDGJ+CeU1zX1chN6UjgLcnTynj8y 8rl9PRJDZlfpD/rHyM6dANVpQZJYZcaJ8TzjjJ1sOMJh55u46lwHrHRgOqujfrjg0o 11B0L7XlKnlEoH5boYgiwQfcuHIKd0M9w5aqbZy4= Message-ID: <0b7ef57e-bf30-440b-9478-d8f587f2637c@dalibo.com> Date: Tue, 27 Feb 2024 10:55:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Logging parallel worker draught Content-Language: fr To: Tomas Vondra , "Imseih (AWS), Sami" , Alvaro Herrera Cc: Robert Haas , Amit Kapila , pgsql-hackers , Melanie Plageman References: <10D5C31A-A303-4440-BCA2-921440A9E1CC@amazon.com> <202310111011.lyo66rk7k7pu@alvherre.pgsql> <9E9E69BD-BABB-49BB-8B69-61939179F20D@amazon.com> <11e34b80-b0a6-e2e4-1606-1f5077379a34@dalibo.com> <0d08b978-10cb-4512-bcef-ca1f192049ab@enterprisedb.com> From: =?UTF-8?Q?Benoit_Lobr=C3=A9au?= Autocrypt: addr=benoit.lobreau@dalibo.com; keydata= xsBNBF3FR7IBCADDvtR0p09SI9OvnbWw+VEvO5IXefBWFWefxrPd0H3Sf3gsBLiKbRdkSjvz 2y+ksRgBUkhK1Kiqe/QuddgvuT9OUFBCrOtZxkBgJYRbxBNTOnIehhEoK9sdqjwvwNyxJUEX er1UgErP+MJTvwpW1J8Uq9oV+NbqgNQ7ca5G2D3x7DI2Tbbw0iu+lmCIdXQpTk7hacErGscC p/eaJQFd6EPAZPS7BQEgjuDDjGCy4RzTSiobtqn0ocaEj+w7365FVKKZD2LjEm1mfBK/4nml H/vlssXkKKpUGetaib6AVpZK3a0xBTMi04ft/V8iGGJuVhE45WjjKSckmeLafTZCGxN9ABEB AAHNK0Jlbm9pdCBMb2Jyw6lhdSA8YmVub2l0LmxvYnJlYXVAZGFsaWJvLmNvbT7CwJQEEwEI AD4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRkbHJAht3VPY+ptaDDJY+vq0O76wUC Za56QgUJC6uZkAAKCRDDJY+vq0O760ECCACDPj6p9VXaX4GF9p+3zhoDwxsUWh0xODwsK//h SBGsRmPaElApbOR5rs2WDFaPE95XG3Vdo2rno7i4mt0fASls7vq4P0BPJiPM4fKEr+kfX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b.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/25/24 20:13, Tomas Vondra wrote: > 1) name of the GUC ... > 2) logging just the failures provides an incomplete view > log_parallel_workers = {none | failures | all}> > where "failures" only logs when at least one worker fails to start, and > "all" logs everything. > > AFAIK Sami made the same observation/argument in his last message [1]. I like the name and different levels you propose. I was initially thinking that the overall picture would be better summarized (an easier to implement) with pg_stat_statements. But with the granularity you propose, the choice is in the hands of the DBA, which is great and provides more options when we don't have full control of the installation. > 3) node-level or query-level? ... > There's no value in having information about every individual temp file, > because we don't even know which node produced it. It'd be perfectly > sufficient to log some summary statistics (number of files, total space, > ...), either for the query as a whole, or perhaps per node (because > that's what matters for work_mem). So I don't think we should mimic this > just because log_temp_files does this. I must admit that, given my (poor) technical level, I went for the easiest way. If we go for the three levels you proposed, "node-level" makes even less sense (and has great "potential" for spam). I can see one downside to the "query-level" approach: it might be more difficult to to give information in cases where the query doesn't end normally. It's sometimes useful to have hints about what was going wrong before a query was cancelled or crashed, which log_temp_files kinda does. > I don't know how difficult would it be to track/collect this information > for the whole query. I am a worried this will be a little too much for me, given the time and the knowledge gap I have (both in C and PostgreSQL internals). I'll try to look anyway. -- Benoit Lobréau Consultant http://dalibo.com