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 1sU355-00031P-VN for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 11:44:24 +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 1sU343-0003Mu-Qh for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 11:43:20 +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 1sU343-0003Jw-0v for pgsql-hackers@lists.postgresql.org; Wed, 17 Jul 2024 11:43:19 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sU33y-0000sN-ST for pgsql-hackers@postgresql.org; Wed, 17 Jul 2024 11:43:16 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-66498fd4f91so10406037b3.3 for ; Wed, 17 Jul 2024 04:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; t=1721216594; x=1721821394; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=vILACZv4WjAdFXXHEYRm8B1nNDZC/lGOmnXR6uyExiY=; b=fjJ4AAd5Qfi/Y95smY90SKBNTwpu47ucDMPM2XyFELqux6zbjZZqF0dOkk8pfDJNDL ARZJiwYzjbmJsAFTG7+6qI2FNdkTSKifZQxSZlwG8r5oUtyRr7fvN/zV1brNfd5i42lU MSTN7MZn7m6hZpsJKtA+oagnoB72WKYnELtmmg3ofZ69eREZf/NV83E1RCXXdWaeBcyX 3P/QfYfDMTRt/IbQZgWZ7NRRlMWRIaAG8IAlQac5H+osojWBX0nmxPmvV/HrYKsnb3f4 BENeqy+beeWpwfCFdWXs38nFx/LRpe7ZaCrKaEN2OAbB7Gnod0vrEJIecXaHld4TZA6v M2Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721216594; x=1721821394; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vILACZv4WjAdFXXHEYRm8B1nNDZC/lGOmnXR6uyExiY=; b=eTpZ9DVoT46riPkpZRMKz8stMTZDL0RT5b3AiBXz84rTx1UGt1aY+n+GGGr4/Z4KHb lZuwvmtRWNPTmvLvxzDTGVGkFncxXfb+ZwAJgl4aI428KtqVo2fljX7sqZy7gc686FnR cD7MSdnqIxuOTkE9iCmskaAd0XqSgB+kF1P174Y1HcX9ZOmZn4ealWULtKk4ErcniUqQ 4uZL+W2hicLnOjtE2DvFjBYs2bgALgk6jz6mGzM3Z6H/rEwMkUJ0aobdHB4NZglekp8Z aoFuuhRzOMLRrcpmSxSfTWZFvYHx3AoPeQtDid+IWDR+7Hzz6PFmdS8bcZxkWqq3i75k w+MQ== X-Gm-Message-State: AOJu0YyzS4mDdBxU0sQmFTVQ46FynIPEj0kOha5S4wu4av8SQDInGZr2 XNyFOgYcDxj422eXN6O1AFvIP5CXNQqqpHWTYdjZuTyiWKeKR91MnpxijwvsAFE= X-Google-Smtp-Source: AGHT+IGGbcqNZnQLttBpeURY0NCI13Q3FXSSCnGJX+7sqpo+0iMe9K2rCPo17vEDXOnqUH8XmiaBuw== X-Received: by 2002:a81:a247:0:b0:64a:3d6c:476d with SMTP id 00721157ae682-664fe35a185mr17996187b3.25.1721216593904; Wed, 17 Jul 2024 04:43:13 -0700 (PDT) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id 00721157ae682-65fc44520c7sm14978707b3.129.2024.07.17.04.43.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jul 2024 04:43:13 -0700 (PDT) Message-ID: <12f6d0f0-0b5d-46e3-afa9-c35bd418d49f@joeconway.com> Date: Wed, 17 Jul 2024 07:43:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RFC: pg_stat_logmsg To: Tomas Vondra , Gurjeet Singh , Masahiko Sawada Cc: PostgreSQL-development References: <89742024-d51a-c66b-90b9-67f837072cd2@joeconway.com> <3b1683bc-2630-a0d0-6083-8a45aa1b54bf@joeconway.com> <5dc12198-80ff-4e70-b187-11ef33418411@enterprisedb.com> Content-Language: en-US From: Joe Conway Autocrypt: addr=mail@joeconway.com; keydata= xsFNBEpXMCsBEADDnXUQzjlyi/cX02Gtdy2CLcroE5CsC7DJKdOBDbfgn0kfiIYoV5JniG4l VyzZUodY8yUAagqLYolh0UkBzs9N+qkm7erde4ypw3jzVQ37BuzIvk3nMUbuDZDgxWqX+nVS sKc+BQ5BpzgCHg48leoRO2ohjvYnUhgH3j2rFZCzaj6qQ7mv+XoxOJmUlVQtG06Jwkk7Vu14 7U9nMMM6hyUKzVnmCphnlcMNo26UyVU70MwFfFJgcI0c5fpp8byN56eD6VJVnufO5WAuEhzE qcrSJR2FAlmM90GBY+6vP29twLDCHuSFvrnujNCx/BvCC/a3/gPvyAFp4JtMm9eXAmq3m/Kw 94nTJXVdcbQeQQDp3KIG7MmWS4lnGvPn8v0CjgNaLvZXFLo1FgmUVsyEq1Lww4iRLa6sbpXJ ESx15UEue1k1YZM9C+4F/o3aeKNsAienjw2EXFzcaxIg/C4P493VMi3Qa8ycVxR5iYhUbYdo DFIUQhbFNsYfrtW/qZAELT3FCYFpZYG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FVBcG12qoKf+ltL9qXJc1y7BGeCoUW6QjOpljpq6ZL4FQUsM0RSRjs 5egE3szPcIf5SyPK6WDOApoAq6M7BBFMGDZwEylYMtr0YekA1u86UA9D2xwLHEbBBp/uiby1 c9JbPJ1Pn8zJP8WZNeRw4Q9TtqVK09+oLirMUSpIDd6KdZ1VgRxOK2re7tjDvkVuYsSrsiJ+ 1iJNEnp9iK0ok0DlJpSCe6KhkxpaTdeoWMXdKuJWec0NIqoAd54ZgBPnr+UPxTixgPq/p6Q= In-Reply-To: <5dc12198-80ff-4e70-b187-11ef33418411@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/16/24 18:14, Tomas Vondra wrote: > I noticed this patch hasn't moved since September 2023, so I wonder > what's the main blocker / what is needed to move this? Mainly me finding time I'm afraid. > As for the feature, I've never done a fleet-wide analysis, so if this is > one of the main use cases, I'm not really sure I can judge if this is a > good tool for that. It seems like it might be a convenient way to do > that, but does that require we add the module to contrib? I had an offlist chat with Andres about this IIRC and he suggested he thought it ought to be just built in to the backend as part of the statistics subsystem. Lately though I have been toying with the idea of keeping it as an extension and basing it off Michael Paquier's work for Pluggable cumulative statistics. > As for the code, I wonder if the instability of line numbers could be a > problem - these can change (a little bit) between minor releases, so > after an upgrade we'll read the dump file with line numbers from the old > release, and then start adding entries with new line numbers. Do we need > to handle this in some way? Hmm, yeah, I had been planning to include postgres version as part of the output, but maybe it would need to be part of the key. > This might be partially solved by eviction of entries from the old > release - we apply decay, so after a while their usage will be 0. But > what if there's no pressure for space, we'll not actually evict them. > And it'll be confusing to have a mix of old/new line numbers. Agreed. I am going to try hard to get back to this sooner rather than later, but realistically that might be in time for the September commitfest rather than during this one. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com