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 1vETmy-00C9Al-Hx for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Oct 2025 14:38:07 +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 1vETmx-008slK-Eb for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Oct 2025 14:38:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vETmx-008slC-4s for pgsql-hackers@lists.postgresql.org; Thu, 30 Oct 2025 14:38:06 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vETmt-0055Cl-2D for pgsql-hackers@postgresql.org; Thu, 30 Oct 2025 14:38:05 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-785f96ae837so12754897b3.3 for ; Thu, 30 Oct 2025 07:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761835081; x=1762439881; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3vdkNxMwOnHygi/HNemiBwR5XlpnIug6AtvnMLl4T1w=; b=RfC/3tBPjsVL9HZvLdQqr5raRJHKeRKKJN7WrDXcdl18Fqul/3M/lLcH/YuRpQbTwB 08bWP86B+eAjtHMjul+rDIUnUUpvewZnj6Fu8la+5/LuPvQmCjYo0J8LTe3LbmEjSuJo J96YcqUvbCUtgS0/HVmMkePAE+R/wJ4H2bv+yxbUHpCfUAHN575jIhM1zqR3bAgTSVp3 9uMVLyFKI06TYmvz3JwnMsSxA8Gk48vvS5/sP4Ng+vKpdAw9RQMOujk/JAHZQjLhXaDT bNJIKU2AFqR7AF5GlNrlVY/H5of1EFS8fvcmH0mZMOi6+ljYQTlAKof1LC87yZr8KrbY xlcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761835081; x=1762439881; h=content-transfer-encoding:in-reply-to: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=3vdkNxMwOnHygi/HNemiBwR5XlpnIug6AtvnMLl4T1w=; b=LoQfQxvYpxBQ01c4liWkzkPLddi1ZccgxkkAJZK2WCFSB+NEbS47leo/HCwA6iejnB mBEj0EffFxYR+fdPDFzdusBGQYOqZ+ua2HNCz7s1tBVjUTGuiMQ6Nb5uKuas2hGdqh4Z yEA+Q6S4nhFGpLpuQ2rgJl3sEfCgGtZ3ybxGnSxxEXewYLrvBXzub31Dgmi1FriYPWYf pyNg8CNZmCO4h/YQ7owbZHbK3lRa4zXGvwRENL1v7dCZ66xrYJywP9rYG6tBZRCh0WEW zCv9/mAWVexpaWbVoFvXuPmb/60mRnWwjLREdoCIaz4pPwFr2SGWC3EWOQXOA6UQWSqE ovMw== X-Forwarded-Encrypted: i=1; AJvYcCXxeOH8YA+KpOGHUYz0O7ldURaNQzBh1ko63PZLvxX/9jI3MplpscSIG1vMn1CmorjRBo4mq2bjxwwX5GDp@postgresql.org X-Gm-Message-State: AOJu0YwkoH/NhTVMtyeQW0grXHWlmqxWvNiaxBlGg1LawbUiPNkbjiAi 8B0jGz+LdjJ8fbeO1wvrcKIqQJI8XBVft7ar12ka+oBGTCavHEwWBELQ X-Gm-Gg: ASbGncsHVb/iW4D1A2uNPZ5XyDOQRlYjuHIyw3HYt1HtXCzc9QVuDUu6J45E6E9xZuK P8J7q99hGKmpCAK6AZaOZqyy1a2g2c+z0F6eVzeOatWEgzdWs9x0vKsbk6nN3AYBB+apumdS63P NeVsQZUvBdfHzTd+ITbe8c+MXqXpT0gteOlKkA9yiiEmQnVOBnM2cP0iVV3K8RaBx4TObwMqu5b GCChm8TI7Jpx7CrMD2NlPi9+zwqDwDp8QmFTufC28udicb9UJFxoB2OjS5dTJHNDSPSqbKoCyLv r+ETLEibwADVqEbTFdo9tjGfDE7W5U+xfFLfaPVYV9OeBGCxPg4BSlqZQ0noccnhsNftb4yvaSL euQIXNdA/CobsxW8uk1310A+CuRX610q6WaMWDV395CickZCtyqRUUVeyexRhPP6A+3SaB5/NH1 RQnGOVV4gU2qKbEdpjLGL1D5YDgNJN+ZIxgMQe1z+n7ts+lrpBj2dCESjEJIJQWcNO X-Google-Smtp-Source: AGHT+IFriXlCYJjQnBA0XbOB86v0oe+oR+C3B/dvj0K7xFTZyENDSSY+yZDkdloxOxp1c12nfSrJVA== X-Received: by 2002:a05:690c:892:b0:784:a2f3:85bf with SMTP id 00721157ae682-7862904cda2mr64767627b3.58.1761835081333; Thu, 30 Oct 2025 07:38:01 -0700 (PDT) Received: from ?IPV6:2600:1700:8952:80:b945:693f:d5d2:6c5e? ([2600:1700:8952:80:b945:693f:d5d2:6c5e]) by smtp.gmail.com with ESMTPSA id 00721157ae682-785ed1c7e6fsm45465087b3.44.2025.10.30.07.38.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Oct 2025 07:38:00 -0700 (PDT) Message-ID: Date: Thu, 30 Oct 2025 08:38:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Add Windows support for backtrace_functions (MSVC only) To: Jakub Wartak Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Euler Taveira , Michael Paquier , pgsql-hackers References: <202510300932.isdvgkzqzshk@alvherre.pgsql> <5b4c6ce0-ed17-4abb-9127-859cc95cbdf3@gmail.com> Content-Language: en-US From: Bryan Green In-Reply-To: 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 10/30/2025 3:52 AM, Jakub Wartak wrote: > On Thu, Oct 30, 2025 at 10:40 AM Bryan Green wrote: >> >> On 10/30/2025 3:37 AM, Álvaro Herrera wrote: >>> On 2025-Oct-30, Jakub Wartak wrote: >>> >>>> Hi Bryan, cfbot is red. I'm was fan of having those tests for this >>>> (bring complexity and we didn't have tests for Linux backtrace >>>> anyway), but now MINGW win32 is failing on those tests where the >>>> feature is not present: >>> >>> I hate to say this after the code is written, but I think we should not >>> put any tests in the first step. I predict that these are going to be >>> enormously brittle and that we'll waste a lot of time making them >>> stable. I think we should commit the Windows support for backtraces >>> first, then consider whether we actually want TAP tests for the overall >>> feature. We've gone several years with glibc backtrace support without >>> any tests -- why do we think the Windows implementation thereof _must_ >>> necessarily have them? >>> >> It will not bother me to remove them. It was my first effort at writing >> TAP tests, so it was a nice learning experience. > > Well, that was a typo on my part (stupid me), I wanted to write: I was > NOT a fan of having those tests for this (in first place) - sorry for > confusion! > > Anyway we have test because I think Michael and Euler triggered this > but earlier i've tried to persuade NOT to do this (see: `Also is it > worth it to test that setting backtrace_funciton=FOO really emits > .*FOO.* in log message cross-platform way?`), anyway Bryan implemented > this and it looks like v3 has just turned [gG]reen ;) > (https://cirrus-ci.com/build/6001832838823936) > > -J. The tests are easy enough to get rid of. I think Alvaro has a good idea of committing the windows support for backtraces and then consider whether we want TAP tests or not. I will make a v4 patch without the TAP tests unless someone strongly objects. The tests don't really test whether this code would be the cause of cause of a problem, they mainly test whether you are getting the correct output in your backtrace. If you have a pdb file, you should get filenames and linenumbers in addition to addresses and symbols. If you don't have a pdb file you will only get export function symbols and addresses. So, even if you should have a pdb and don't...you still get something useful. Bryan Green