agora inbox for [email protected]  
help / color / mirror / Atom feed
Invalidate acl.c caches for pg_authid.rolinherit changes
1601+ messages / 3 participants
[nested] [flat]

* Invalidate acl.c caches for pg_authid.rolinherit changes
@ 2020-12-21 09:50  Noah Misch <[email protected]>
  0 siblings, 1 reply; 1601+ messages in thread

From: Noah Misch @ 2020-12-21 09:50 UTC (permalink / raw)
  To: pgsql-hackers

Backends reflect "GRANT role_name" changes rather quickly, due to a syscache
invalidation callback.  Let's register an additional callback to reflect
"ALTER ROLE ... [NO]INHERIT" with equal speed.  I propose to back-patch this.
While pg_authid changes may be more frequent than pg_auth_members changes, I
expect neither is frequent enough to worry about the resulting acl.c cache
miss rate.

pg_authid changes don't affect cached_membership_roles, so I could have
invalidated cached_privs_roles only.  That felt like needless complexity.  I
expect cached_privs_role gets the bulk of traffic, since SELECT, INSERT,
UPDATE and DELETE use it.  cached_membership_roles pertains to DDL and such.

Author:     Noah Misch <[email protected]>
Commit:     Noah Misch <[email protected]>

    Invalidate acl.c caches when pg_authid changes.
    
    This makes existing sessions reflect "ALTER ROLE ... [NO]INHERIT" as
    quickly as they have been reflecting "GRANT role_name".  Back-patch to
    9.5 (all supported versions).
    
    Reviewed by FIXME.
    
    Discussion: https://postgr.es/m/FIXME

diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index f97489f..fe6c444 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -52,7 +52,6 @@ typedef struct
  * role.  In most of these tests the "given role" is the same, namely the
  * active current user.  So we can optimize it by keeping a cached list of
  * all the roles the "given role" is a member of, directly or indirectly.
- * The cache is flushed whenever we detect a change in pg_auth_members.
  *
  * There are actually two caches, one computed under "has_privs" rules
  * (do not recurse where rolinherit isn't true) and one computed under
@@ -4675,12 +4674,16 @@ initialize_acl(void)
 	if (!IsBootstrapProcessingMode())
 	{
 		/*
-		 * In normal mode, set a callback on any syscache invalidation of
-		 * pg_auth_members rows
+		 * In normal mode, set a callback on any syscache invalidation of rows
+		 * of pg_auth_members (for each AUTHMEM search in this file) or
+		 * pg_authid (for has_rolinherit())
 		 */
 		CacheRegisterSyscacheCallback(AUTHMEMROLEMEM,
 									  RoleMembershipCacheCallback,
 									  (Datum) 0);
+		CacheRegisterSyscacheCallback(AUTHOID,
+									  RoleMembershipCacheCallback,
+									  (Datum) 0);
 	}
 }
 
diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out
index 0a2dd37..7754c20 100644
--- a/src/test/regress/expected/privileges.out
+++ b/src/test/regress/expected/privileges.out
@@ -350,6 +350,13 @@ SET SESSION AUTHORIZATION regress_priv_user1;
 SELECT * FROM atest3; -- fail
 ERROR:  permission denied for table atest3
 DELETE FROM atest3; -- ok
+BEGIN;
+RESET SESSION AUTHORIZATION;
+ALTER ROLE regress_priv_user1 NOINHERIT;
+SET SESSION AUTHORIZATION regress_priv_user1;
+DELETE FROM atest3;
+ERROR:  permission denied for table atest3
+ROLLBACK;
 -- views
 SET SESSION AUTHORIZATION regress_priv_user3;
 CREATE VIEW atestv1 AS SELECT * FROM atest1; -- ok
diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql
index e0c1a29..4911ad4 100644
--- a/src/test/regress/sql/privileges.sql
+++ b/src/test/regress/sql/privileges.sql
@@ -220,6 +220,12 @@ SET SESSION AUTHORIZATION regress_priv_user1;
 SELECT * FROM atest3; -- fail
 DELETE FROM atest3; -- ok
 
+BEGIN;
+RESET SESSION AUTHORIZATION;
+ALTER ROLE regress_priv_user1 NOINHERIT;
+SET SESSION AUTHORIZATION regress_priv_user1;
+DELETE FROM atest3;
+ROLLBACK;
 
 -- views
 


Attachments:

  [text/plain] noinherit-inval-v1.patch (2.8K, ../../[email protected]/2-noinherit-inval-v1.patch)
  download | inline diff:
Author:     Noah Misch <[email protected]>
Commit:     Noah Misch <[email protected]>

    Invalidate acl.c caches when pg_authid changes.
    
    This makes existing sessions reflect "ALTER ROLE ... [NO]INHERIT" as
    quickly as they have been reflecting "GRANT role_name".  Back-patch to
    9.5 (all supported versions).
    
    Reviewed by FIXME.
    
    Discussion: https://postgr.es/m/FIXME

diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index f97489f..fe6c444 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -52,7 +52,6 @@ typedef struct
  * role.  In most of these tests the "given role" is the same, namely the
  * active current user.  So we can optimize it by keeping a cached list of
  * all the roles the "given role" is a member of, directly or indirectly.
- * The cache is flushed whenever we detect a change in pg_auth_members.
  *
  * There are actually two caches, one computed under "has_privs" rules
  * (do not recurse where rolinherit isn't true) and one computed under
@@ -4675,12 +4674,16 @@ initialize_acl(void)
 	if (!IsBootstrapProcessingMode())
 	{
 		/*
-		 * In normal mode, set a callback on any syscache invalidation of
-		 * pg_auth_members rows
+		 * In normal mode, set a callback on any syscache invalidation of rows
+		 * of pg_auth_members (for each AUTHMEM search in this file) or
+		 * pg_authid (for has_rolinherit())
 		 */
 		CacheRegisterSyscacheCallback(AUTHMEMROLEMEM,
 									  RoleMembershipCacheCallback,
 									  (Datum) 0);
+		CacheRegisterSyscacheCallback(AUTHOID,
+									  RoleMembershipCacheCallback,
+									  (Datum) 0);
 	}
 }
 
diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out
index 0a2dd37..7754c20 100644
--- a/src/test/regress/expected/privileges.out
+++ b/src/test/regress/expected/privileges.out
@@ -350,6 +350,13 @@ SET SESSION AUTHORIZATION regress_priv_user1;
 SELECT * FROM atest3; -- fail
 ERROR:  permission denied for table atest3
 DELETE FROM atest3; -- ok
+BEGIN;
+RESET SESSION AUTHORIZATION;
+ALTER ROLE regress_priv_user1 NOINHERIT;
+SET SESSION AUTHORIZATION regress_priv_user1;
+DELETE FROM atest3;
+ERROR:  permission denied for table atest3
+ROLLBACK;
 -- views
 SET SESSION AUTHORIZATION regress_priv_user3;
 CREATE VIEW atestv1 AS SELECT * FROM atest1; -- ok
diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql
index e0c1a29..4911ad4 100644
--- a/src/test/regress/sql/privileges.sql
+++ b/src/test/regress/sql/privileges.sql
@@ -220,6 +220,12 @@ SET SESSION AUTHORIZATION regress_priv_user1;
 SELECT * FROM atest3; -- fail
 DELETE FROM atest3; -- ok
 
+BEGIN;
+RESET SESSION AUTHORIZATION;
+ALTER ROLE regress_priv_user1 NOINHERIT;
+SET SESSION AUTHORIZATION regress_priv_user1;
+DELETE FROM atest3;
+ROLLBACK;
 
 -- views
 


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

* Re: Invalidate acl.c caches for pg_authid.rolinherit changes
@ 2020-12-21 19:01  Bossart, Nathan <[email protected]>
  parent: Noah Misch <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Bossart, Nathan @ 2020-12-21 19:01 UTC (permalink / raw)
  To: Noah Misch <[email protected]>; pgsql-hackers

On 12/21/20, 1:51 AM, "Noah Misch" <[email protected]> wrote:
> Backends reflect "GRANT role_name" changes rather quickly, due to a syscache
> invalidation callback.  Let's register an additional callback to reflect
> "ALTER ROLE ... [NO]INHERIT" with equal speed.  I propose to back-patch this.
> While pg_authid changes may be more frequent than pg_auth_members changes, I
> expect neither is frequent enough to worry about the resulting acl.c cache
> miss rate.

+1 to back-patching.

> pg_authid changes don't affect cached_membership_roles, so I could have
> invalidated cached_privs_roles only.  That felt like needless complexity.  I
> expect cached_privs_role gets the bulk of traffic, since SELECT, INSERT,
> UPDATE and DELETE use it.  cached_membership_roles pertains to DDL and such.

The patch looks reasonable to me.

Nathan



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25  Andy Fan <[email protected]>
  0 siblings, 0 replies; 1601+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1601+ messages in thread


end of thread, other threads:[~2024-09-11 04:25 UTC | newest]

Thread overview: 1601+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 09:50 Invalidate acl.c caches for pg_authid.rolinherit changes Noah Misch <[email protected]>
2020-12-21 19:01 ` Bossart, Nathan <[email protected]>
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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]>
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox