agora inbox for [email protected]  
help / color / mirror / Atom feed
Re: dblink_ora - a first shot on Oracle ...
1604+ messages / 4 participants
[nested] [flat]

* Re: dblink_ora - a first shot on Oracle ...
@ 2003-07-21 16:13 Bruce Momjian <[email protected]>
  2003-07-22 05:34 ` Re: dblink_ora - a first shot on Oracle ... Hans-Jürgen Schönig <[email protected]>
  0 siblings, 1 reply; 1604+ messages in thread

From: Bruce Momjian @ 2003-07-21 16:13 UTC (permalink / raw)
  To: Hans-Jürgen Schönig <[email protected]>; +Cc: Joe Conway <[email protected]>; Tom Lane <[email protected]>; Peter Eisentraut <[email protected]>; Hans-Jürgen Schönig <[email protected]>; pgsql-hackers; EG <[email protected]>


Hans, I am a little confused about what you are suggesting.  Are you
suggesting flag to the make of the contrib module rather than configure
tests?

I agree this is a killer feature for many people and would like to have
it in 7.4.

---------------------------------------------------------------------------

Hans-Jürgen Schönig wrote:
> > I think for that very reason (SQL-MED) we need to come to terms with 
> > this issue. If/when connections to external data sources is in the 
> > backend, you'll have those exact same dependencies. And in fact, we do 
> > today: consider '--with-openssl' or '--with-tcl'.
> > 
> > I had always assumed we would need '--with-oracle', '--with-jdbc',  etc 
> > (or whatever you want to call them) to support backend connections to 
> > external sources. And this discussion is the very reason I was hesitant 
> > to pursue dblink_ora or jdbclink now, because I didn't think people 
> > would be comfortable with configure options to support a contrib library.
> > 
> > Joe
> 
> If dblink was a core module I would say that adding the configure stuff 
> would be very natural. Since this is contrib stuff I was not that sure 
> about configure anymore. We will need additional flags for external data 
> sources in the (hopefully) near future so I think we should add it.
> 
> Personally I tend to think about a solution like that. dblink has a 
> great future and many people simply love it (I cannot think of a 
> customer who does not like it - it is a killer feature):
> 
> - implement the concepts proposed by Joe on this list yesterday (I am 
> talking about the functions dblink should provide)
> - add support to configure
> - merge dblink with dblink_ora as soon as the changes are ready
> - adapt jdbc_link and merge it with dblink
> - implement dblink_db2, dblink_csv, dblink_xml, and maybe some others
> - leave it in contrib because this way it will be shipped with the core 
> distribution and people will use it more frequently
> 
> I hope that I will finish the Oracle stuff (named connections, ...) 
> within the next 3 days.
> 
> 	Regards,
> 
> 		Hans
> 
> 
> -- 
> Cybertec Geschwinde u Schoenig
> Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
> Tel: +43/2952/30706; +43/664/233 90 75
> www.cybertec.at, www.postgresql.at, kernel.cybertec.at
> 
> 
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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

* Re: dblink_ora - a first shot on Oracle ...
  2003-07-21 16:13 Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
@ 2003-07-22 05:34 ` Hans-Jürgen Schönig <[email protected]>
  2003-07-22 16:28   ` Re: dblink_ora - a first shot on Oracle ... Josh Berkus <[email protected]>
  0 siblings, 1 reply; 1604+ messages in thread

From: Hans-Jürgen Schönig @ 2003-07-22 05:34 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Joe Conway <[email protected]>; Tom Lane <[email protected]>; Peter Eisentraut <[email protected]>; Hans-Jürgen Schönig <[email protected]>; pgsql-hackers; EG <[email protected]>

Bruce Momjian wrote:
> Hans, I am a little confused about what you are suggesting.  Are you
> suggesting flag to the make of the contrib module rather than configure
> tests?
> 
> I agree this is a killer feature for many people and would like to have
> it in 7.4.
> 


Under these circumstances I was thinking of integrating it into the main 
configuration mechanism - not just for contrib.
We will need it for cross db suff later on anyway.

Sorry for the confusion.

	Regards,

		Hans


-- 
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/664/233 90 75
www.cybertec.at, www.postgresql.at, kernel.cybertec.at





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

* Re: dblink_ora - a first shot on Oracle ...
  2003-07-21 16:13 Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
  2003-07-22 05:34 ` Re: dblink_ora - a first shot on Oracle ... Hans-Jürgen Schönig <[email protected]>
@ 2003-07-22 16:28   ` Josh Berkus <[email protected]>
  2003-07-22 16:57     ` Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 1604+ messages in thread

From: Josh Berkus @ 2003-07-22 16:28 UTC (permalink / raw)
  To: Hans-Jürgen Schönig <[email protected]>; Bruce Momjian <[email protected]>; +Cc: Joe Conway <[email protected]>; Tom Lane <[email protected]>; Peter Eisentraut <[email protected]>; Hans-Jürgen Schönig <[email protected]>; pgsql-hackers; EG <[email protected]>

Hans, Bruce,

We're drafting the press release for 7.4 right now.   What's the odds that 
dblink_ora will be ready in time for 7.4?

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



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

* Re: dblink_ora - a first shot on Oracle ...
  2003-07-21 16:13 Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
  2003-07-22 05:34 ` Re: dblink_ora - a first shot on Oracle ... Hans-Jürgen Schönig <[email protected]>
  2003-07-22 16:28   ` Re: dblink_ora - a first shot on Oracle ... Josh Berkus <[email protected]>
@ 2003-07-22 16:57     ` Bruce Momjian <[email protected]>
  2003-07-25 08:49       ` Re: dblink_ora - a first shot on Oracle ... Hans-Jürgen Schönig <[email protected]>
  0 siblings, 1 reply; 1604+ messages in thread

From: Bruce Momjian @ 2003-07-22 16:57 UTC (permalink / raw)
  To: Josh Berkus <[email protected]>; +Cc: Hans-Jürgen Schönig <[email protected]>; Joe Conway <[email protected]>; Tom Lane <[email protected]>; Peter Eisentraut <[email protected]>; Hans-Jürgen Schönig <[email protected]>; pgsql-hackers; EG <[email protected]>

Josh Berkus wrote:
> Hans, Bruce,
> 
> We're drafting the press release for 7.4 right now.   What's the odds that 
> dblink_ora will be ready in time for 7.4?

There seems to be some disagreement on whether the Oracle lib checks
should be in configure for a /contrib module, and I don't know how far
Hans is.  I will say we are probably looking at 7/28 for beta.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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

* Re: dblink_ora - a first shot on Oracle ...
  2003-07-21 16:13 Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
  2003-07-22 05:34 ` Re: dblink_ora - a first shot on Oracle ... Hans-Jürgen Schönig <[email protected]>
  2003-07-22 16:28   ` Re: dblink_ora - a first shot on Oracle ... Josh Berkus <[email protected]>
  2003-07-22 16:57     ` Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
@ 2003-07-25 08:49       ` Hans-Jürgen Schönig <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Hans-Jürgen Schönig @ 2003-07-25 08:49 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Josh Berkus <[email protected]>; Joe Conway <[email protected]>; Tom Lane <[email protected]>; Peter Eisentraut <[email protected]>; Hans-Jürgen Schönig <[email protected]>; pgsql-hackers; EG <[email protected]>

> There seems to be some disagreement on whether the Oracle lib checks
> should be in configure for a /contrib module, and I don't know how far
> Hans is.  I will say we are probably looking at 7/28 for beta.


I am afraid I won't make it until 7.4beta1.
The problem is that I have not managed to have more than just one 
connection to oracle at the same time. For some Oracle reason I don't 
know what went wrong. I will have a closer look at that.

However, named connections don't make too much sense with just one 
connection ;). I have troubles testing it as long as the connect fails ...
There is some other Oracle specific stuff which seems to be more painful 
than I have expected.
Have I already told you that I hate Oracle?

Let's wait for the next major release and prepare something really 
useful. I am still not quite satisfied with what we have at the moment.

	Hans

-- 
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/664/233 90 75
www.cybertec.at, www.postgresql.at, kernel.cybertec.at





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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.45.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread

* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
  0 siblings, 0 replies; 1604+ messages in thread

From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)

enlargeStringInfo  has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely  hint in
enlargeStringinfo to avoid some overhead.
---
 src/common/stringinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
 	 * Guard against out-of-range "needed" values.  Without this, we can get
 	 * an overflow or infinite loop in the following.
 	 */
-	if (needed < 0)				/* should not happen */
+	if (unlikely(needed < 0))				/* should not happen */
 	{
 #ifndef FRONTEND
 		elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
 		exit(EXIT_FAILURE);
 #endif
 	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+	if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
 	{
 #ifndef FRONTEND
 		ereport(ERROR,
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch



^ permalink  raw  reply  [nested|flat] 1604+ messages in thread


end of thread, other threads:[~2024-09-11 04:25 UTC | newest]

Thread overview: 1604+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 16:13 Re: dblink_ora - a first shot on Oracle ... Bruce Momjian <[email protected]>
2003-07-22 05:34 ` Hans-Jürgen Schönig <[email protected]>
2003-07-22 16:28   ` Josh Berkus <[email protected]>
2003-07-22 16:57     ` Bruce Momjian <[email protected]>
2003-07-25 08:49       ` Hans-Jürgen Schönig <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 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