From dcbb7ddf4ac86f8c4317d71bbc857a468897b877 Mon Sep 17 00:00:00 2001
From: John Naylor <john.naylor@postgresql.org>
Date: Thu, 21 Jul 2022 18:24:49 +0700
Subject: [PATCH v3 5/6] Set insertion sort threshold to 18

For dual-pivot qsort
---
 src/include/lib/sort_template.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/lib/sort_template.h b/src/include/lib/sort_template.h
index d1b8829df5..1ca3a56d36 100644
--- a/src/include/lib/sort_template.h
+++ b/src/include/lib/sort_template.h
@@ -295,7 +295,7 @@ ST_SORT_INTERNAL(ST_POINTER_TYPE * data, size_t n
 
 loop:
 	DO_CHECK_FOR_INTERRUPTS();
-	if (n < 10)
+	if (n < 18)
 	{
 		for (pm = a + ST_POINTER_STEP; pm < a + n * ST_POINTER_STEP;
 			 pm += ST_POINTER_STEP)
-- 
2.36.1

