Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

From: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
Date: 2025-10-30 08:01:30
Message-ID: CAKZiRmwfBySmwReFJwqi_-y-2uezRiX15VPT2kizsCAzdJLraw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 30, 2025 at 4:06 AM Bryan Green <dbryan(dot)green(at)gmail(dot)com> 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:

[03:57:44.552] ------------------------------------- 8<
-------------------------------------
[03:57:44.552] stderr:
[03:57:44.552] # Failed test 'backtrace has valid format'
[03:57:44.552] # at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 106.
[03:57:44.552] # Failed test 'Unable to determine scenario -
PostgreSQL should always have export symbols'
[03:57:44.552] # at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 180.
[03:57:44.552] # Failed test 'Scenario mismatch: expected 2, got 0'
[03:57:44.552] # at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 224.
[03:57:44.552] # Failed test 'PL/pgSQL error has deeper stack (found
0 frames)'
[03:57:44.552] # at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 318.
[03:57:44.552] # Failed test 'multiple rapid errors produced
backtraces (0 addresses found)'
[03:57:44.552] # at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 366.
[03:57:44.552] # Looks like you failed 5 tests of 19.

Anyway, as expected this was thrown:
2025-10-30 03:57:37.973 GMT client backend[244] t_windows_backtrace.pl
BACKTRACE: backtrace generation is not supported by this installation

Please see attached files for convenience as I already had them on
disk. They are from https://commitfest.postgresql.org/patch/6116/ ->
https://cirrus-ci.com/task/5155398535086080 -> artifacts.

Instead of
+# Skip if not Windows
+if ($^O ne 'MSWin32')
+{
+ plan skip_all => 'Windows-specific backtrace tests';
+}

Maybe we could also bypass MINGW too like below ? (but I have no
access, so i havent tried)
use Config;
# Skip if not Windows or MINGW/MSYS is detected
if ($^O ne 'MSWin32' || $Config{'ccname'} =~ /gcc|mingw/i ||
defined($ENV{'MSYSTEM'}))
{
plan skip_all => 'Windows-specific backtrace tests';
}

-J.

Attachment Content-Type Size
regress_log_t_windows_backtrace application/octet-stream 4.9 KB
postgresql-2025-10-30_035737.log.gz application/gzip 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-10-30 08:27:44 Re: Improve docs syntax checking and enable it in the meson build
Previous Message Chao Li 2025-10-30 07:51:53 Re: display hot standby state in psql prompt