agora inbox for [email protected]
help / color / mirror / Atom feedabout 7.0 LIMIT optimization
1601+ messages / 3 participants
[nested] [flat]
* about 7.0 LIMIT optimization
@ 2000-02-23 05:40 Roberto Cornacchia <[email protected]>
2000-02-23 06:03 ` Re: about 7.0 LIMIT optimization Tom Lane <[email protected]>
0 siblings, 1 reply; 1601+ messages in thread
From: Roberto Cornacchia @ 2000-02-23 05:40 UTC (permalink / raw)
To: [email protected]; +Cc: pgsql-hackers
Hi there,
I've just had a look at the 7.0beta and I've seen your enhancements
about LIMIT optimization.
Did you read by chance my previous message intitled
"Generalized Top Queries on PostgreSQL"?
When I wrote it I hadn't read the thread
intitled "Solution for LIMIT cost estimation" yet.
What you did looks pretty similar to part of our extension
(cost model and pruning rules). The main differences are:
- the FOR EACH generalization.
- You cannot select the top N rows according to criterion A ordering
the results with a different criterion B.
- If you ask for the best 10 rows, from a relation including
100000 rows, you have to do a traditional sort on 100000 rows and
then retain only the first 10, doing more comparisons than requested.
- You can choose a "fast-start" plan (i.e., basically,
a pipelined plan), but you cannot performe an "early-stop" of
the stream when you have a "slow-start" plan (e.g. involving sorts
or hash tables). We noticed that this kind of plan often
outperforms the first one.
So, we are looking forward to see how the new LIMIT optimization works
(we will do some tests as soon as possible). Have you noticed
relevant improvements?
Actually, we should say we can't figure out the reason for
managing the LIMIT clause in a so complicated way, not providing
a node in the plan as any other operator.
In our opinion, the choice to provide a separated process of the
LIMIT clause has two problems:
1. We find it more complicated and not so natural.
2. It is an obstacle to some optimizations and to some functionalities
(how to use it in subselects or views?)
Best regards
R. Cornacchia ([email protected]) Computer Science, University of
Bologna
A. Ghidini ([email protected]) Computer Science, University of Bologna
Dr. Paolo Ciaccia ([email protected]) DEIS CSITE-CNR, University of
Bologna
===========================================================
VIRGILIO MAIL - Il tuo indirizzo E-mail gratis e per sempre
http://mail.virgilio.it/
VIRGILIO - La guida italiana a Internet
http://www.virgilio.it/
^ permalink raw reply [nested|flat] 1601+ messages in thread
* Re: about 7.0 LIMIT optimization
2000-02-23 05:40 about 7.0 LIMIT optimization Roberto Cornacchia <[email protected]>
@ 2000-02-23 06:03 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Tom Lane @ 2000-02-23 06:03 UTC (permalink / raw)
To: Roberto Cornacchia <[email protected]>; +Cc: pgsql-hackers
> Did you read by chance my previous message intitled
> "Generalized Top Queries on PostgreSQL"?
I vaguely recall it, but forget the details...
> - You cannot select the top N rows according to criterion A ordering
> the results with a different criterion B.
True, but I don't see how to do that with one indexscan (for that
matter, I don't even see how to express it in the SQL subset that
we support...)
> - If you ask for the best 10 rows, from a relation including
> 100000 rows, you have to do a traditional sort on 100000 rows and
> then retain only the first 10, doing more comparisons than requested.
Not if there's an index that implements the ordering --- and if there
is not, I don't see how to avoid the sort anyway.
> - You can choose a "fast-start" plan (i.e., basically,
> a pipelined plan), but you cannot performe an "early-stop" of
> the stream when you have a "slow-start" plan (e.g. involving sorts
> or hash tables).
Why not? The executor *will* stop when it has as many output rows as
the LIMIT demands.
> We noticed that this kind of plan often outperforms the first one.
I'd be the first to admit that the cost model needs some fine-tuning
still. It's just a conceptual structure at this point.
> Actually, we should say we can't figure out the reason for
> managing the LIMIT clause in a so complicated way, not providing
> a node in the plan as any other operator.
We will probably end up doing it like that sooner or later, in order to
allow attaching LIMIT to sub-selects. I don't take any credit or blame
for the execution-time implementation of LIMIT; I just worked with what
I found...
regards, tom lane
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index eb9d6502fc..838d9b80d0 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -297,7 +297,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -306,7 +306,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.45.1
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20240912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
* [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo.
@ 2024-09-11 04:25 Andy Fan <[email protected]>
0 siblings, 0 replies; 1601+ messages in thread
From: Andy Fan @ 2024-09-11 04:25 UTC (permalink / raw)
enlargeStringInfo has a noticeable ratio in perf peport with a
"select * from pg_class" workload). So add a unlikely hint in
enlargeStringinfo to avoid some overhead.
---
src/common/stringinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..a725ef132d7 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -345,7 +345,7 @@ enlargeStringInfo(StringInfo str, int needed)
* Guard against out-of-range "needed" values. Without this, we can get
* an overflow or infinite loop in the following.
*/
- if (needed < 0) /* should not happen */
+ if (unlikely(needed < 0)) /* should not happen */
{
#ifndef FRONTEND
elog(ERROR, "invalid string enlargement request size: %d", needed);
@@ -354,7 +354,7 @@ enlargeStringInfo(StringInfo str, int needed)
exit(EXIT_FAILURE);
#endif
}
- if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
+ if (unlikely(((Size) needed) >= (MaxAllocSize - (Size) str->len)))
{
#ifndef FRONTEND
ereport(ERROR,
--
2.43.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=v20260912-0001-Refactor-float8out_internval-for-better-pe.patch
^ permalink raw reply [nested|flat] 1601+ messages in thread
end of thread, other threads:[~2024-09-11 04:25 UTC | newest]
Thread overview: 1601+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-02-23 05:40 about 7.0 LIMIT optimization Roberto Cornacchia <[email protected]>
2000-02-23 06:03 ` Tom Lane <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20240912 3/4] add unlikely hint for enlargeStringInfo. Andy Fan <[email protected]>
2024-09-11 04:25 [PATCH v20260912 3/4] add unlikely hint 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