From 8966650c083d786bc85e303569f95ca4f7fcb42b Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
Date: Tue, 7 Apr 2026 13:00:37 +0300
Subject: [PATCH v2] ci: Process only core dump files in cores_backtrace.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The crash directory may contain files other than core dumps, such as
"minfree". The cores_backtrace.sh script previously attempted to process
these files; it now processes only core dump files.

Reported-by: Melanie Plageman <melanieplageman@gmail.com>
Author: Christoph Berg <myon@debian.org>
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/CAN55FZ12R-LG%3DwZZ8yLY7%2BtmVbR%3D9Y_O5uveDHU0nmYT%2BAiTjQ%40mail.gmail.com
---
 src/tools/ci/cores_backtrace.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/ci/cores_backtrace.sh b/src/tools/ci/cores_backtrace.sh
index cb325f21156..a1a14dd0658 100755
--- a/src/tools/ci/cores_backtrace.sh
+++ b/src/tools/ci/cores_backtrace.sh
@@ -28,7 +28,7 @@ if [ "$os" = 'openbsd' ]; then
 fi
 
 first=1
-for corefile in $(find "$directory" -type f) ; do
+for corefile in $(find "$directory" -type f -name '*core*') ; do
     if [ "$first" -eq 1 ]; then
         first=0
     else
-- 
2.47.3

