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 1vDmuw-00G3ry-ET for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 16:51:29 +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 1vDmuv-00E2bT-28 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 16:51:28 +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 1vDmuu-00E2bL-GK for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 16:51:27 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vDmur-004Ei3-1A for pgsql-hackers@postgresql.org; Tue, 28 Oct 2025 16:51:26 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id B358E1D00063; Tue, 28 Oct 2025 12:51:23 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 28 Oct 2025 12:51:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1761670283; x= 1761756683; bh=2gtCrp8S2U6S5LP1qwT3hkOdpjocPLCCub65J2q3U1Q=; b=q qyvvTEZ64h+rE/lJKLZNI9pt18BkE2x/coFwHpj+vTeUkr9vE1ITIvKzemk6dh6p j5o+L9W00XV0QMQbMkO+pqiVhE3U4LTHObypboQIkFYH6aCy6RIY1+iTLdUteTR/ K+IEQBfwELC2TrDtDjynP8LJAWIRt1ZEQNINV49SUV6wNnk4yhhVQnU6y6XJ7Hue U0pRwhJPf1qAkFr3h2/1b9xQkMOr1RFIuyZx8+GBjGWSAtVljwo+ECuG9xzfQag0 KFNoDZsICXZhT+mNXb7QiUer+ks6mpGOyCjM2I9rCIA3M4PPaRvs1D3ES1owidMz mICRBmPMXF+cMXh7fvCzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1761670283; x=1761756683; bh=2 gtCrp8S2U6S5LP1qwT3hkOdpjocPLCCub65J2q3U1Q=; b=dJOxuPBlKfO7QUZDF YBiqTuQhbxp0i4NBgiNJOBtQZJ5th5+XudZmiwDSR+Sr9J5/++DIP+AvFWXhRG/3 GzYJFvvT7RmHDLYPWit9kcs7RCnSFjTMWuQy0jCcuUfhaaZ3Ag2BBwzI3+AuE7qw /+XbTQXAQm17fpdKYtI5btxiWfYbIJLPgqZJUFD57D4QhCUq85RRh08F+iU68SJI qrualHXugGc/Z+HjtcuP8BUrDYJ6PCVj1ktGOlRnXaZoYq4xUDWKc5vqTJVp/tOh UK5g1BTCwSUQWheyKFFb/ykMi+be7XWth1/Jpib90OODMafFKMLad0ubxkw/pItS AX33w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduiedufeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehjrghkuhgsrdifrghrthgrkhesvghnthgvrhhprhhishgvuggs rdgtohhmpdhrtghpthhtohepvghulhgvrhesvghulhgvrhhtohdrtghomhdprhgtphhtth hopegusghrhigrnhdrghhrvggvnhesghhmrghilhdrtghomhdprhgtphhtthhopehmihgt hhgrvghlsehprghquhhivghrrdighiiipdhrtghpthhtohepphhgshhqlhdqhhgrtghkvg hrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Oct 2025 12:51:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1761670280; bh=NktO26Ibt25WhYUOoUPLLy6h6RPtJf7JJjcYyFF77T4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=3qSGtM0JaUH3r4WkrCSB2Bd9MJeUYHhdJWAe8C9A/vo92JknfW8rBfJfoKPVrD884 NaTluNgGiPT0SxtbFS6U+rc+bpvCHKTVRXfVGgbwcDjS4dvaADO3guCdBoLhU+Akw0 3NsdkPLed5Z/mEC0HDKiTZCJ1UDHb+VcsAd6r9BtKNn5QtkYNhIxOJVDMmWumtRHAU ixJlXl+t6oPRSQWRG27KjajorGDkipcBkcV6e/1APQlsSMvDL5ibsqk5iqTPhxlwhP 6tsoYteCYKB3xxnc5PQytgMPfib7iW5EMdOH2wdl1Ij4dkU0Bx7Dir9EFgdkz2hLWq +fu0uJofktgvA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 456BD76; Tue, 28 Oct 2025 18:51:20 +0200 (EET) Date: Tue, 28 Oct 2025 18:51:20 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Euler Taveira Cc: Bryan Green , Michael Paquier , Jakub Wartak , pgsql-hackers Subject: Re: [PATCH] Add Windows support for backtrace_functions (MSVC only) Message-ID: <202510281643.xoy2do2in3bw@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7379da2a-10e1-4fb2-bd77-212daf4b00b8@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Oct-27, Euler Taveira wrote: > On Mon, Oct 27, 2025, at 2:58 PM, Bryan Green wrote: > > Thanks for even glancing at this. I did not add any regression > > tests because the output goes to the server log and not the client. > > Since Michael said WIN32-specific tests and mentioned log pattern, he is > referring to TAP tests. You can add src/test/modules/test_backtrace that > exercises this code path. Hmm, are we really sure this is necessary? > I didn't test your patch but I'm wondering if we could add an > abstraction here. I mean invent pg_backtrace() and > pg_backtrace_symbols() that maps to the current functions (Unix-like). Do we really need this? I don't think we're going to add support for backtraces anywhere else any time soon, so this looks premature. What other programs do you think we have where this would be useful? I have a really hard time imagining that things like psql and pg_dump would be improved by having backtrace-reporting support. And if we have a single place in the code using a facility, then ISTM the platform-specific code can live there with no damage. If somebody is interested in adding backtracing other programs in the future, they can introduce the abstraction then -- we will probably now exactly what sort of API would be useful when we have more than one user than now that we have just the backend, with very specific needs. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La primera ley de las demostraciones en vivo es: no trate de usar el sistema. Escriba un guión que no toque nada para no causar daños." (Jakob Nielsen)