agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH 2/5] Allow composite types in bootstrap
1600+ messages / 2 participants
[nested] [flat]

* [PATCH 2/5] Allow composite types in bootstrap
@ 2020-11-17 15:28 Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Justin Pryzby @ 2020-11-17 15:28 UTC (permalink / raw)

---
 src/backend/bootstrap/bootstrap.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 18eb62ca47..e4fc75ab84 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -916,6 +916,7 @@ gettype(char *type)
 {
 	if (Typ != NIL)
 	{
+		static bool did_reread PG_USED_FOR_ASSERTS_ONLY = false; /* Already reread pg_types */
 		ListCell *lc;
 
 		foreach (lc, Typ)
@@ -927,6 +928,33 @@ gettype(char *type)
 				return app->am_oid;
 			}
 		}
+
+		/*
+		 * The type wasn't known; check again to handle composite
+		 * types, added since first populating the array.
+		 */
+
+		/*
+		 * Once all the types are populated and we handled composite
+		 * types, shouldn't need to do that again.
+		 */
+		Assert(!did_reread);
+		did_reread = true;
+
+		list_free_deep(Typ);
+		Typ = NULL;
+		populate_typ_array();
+
+		/* Need to avoid infinite recursion... */
+		foreach (lc, Typ)
+		{
+			struct typmap *app = lfirst(lc);
+			if (strncmp(NameStr(app->am_typ.typname), type, NAMEDATALEN) == 0)
+			{
+				Ap = app;
+				return app->am_oid;
+			}
+		}
 	}
 	else
 	{
-- 
2.26.2


--------------614DDB87AFFED893713AC0E9
Content-Type: text/x-patch; charset=UTF-8;
 name="0003-Extended-statistics-on-expressions-20210304.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0003-Extended-statistics-on-expressions-20210304.patch"



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1600+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1600+ messages in thread


end of thread, other threads:[~2024-09-11 04:25 UTC | newest]

Thread overview: 1600+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 15:28 [PATCH 2/5] Allow composite types in bootstrap Justin Pryzby <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox